/* Mobile Responsive Styles for Liceo Jacinto de la Concha */

/* Differentiate mobile buttons clearly */
@media (max-width: 768px) {
    /* Navbar positioning for mobile */
    .navbar .container-fluid {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-left: 80px !important;
        padding-right: 80px !important;
    }
    
    /* Center brand name and logo */
    .navbar-brand {
        text-align: center;
        margin: 0 !important;
        padding: 0 10px;
    }
    
    .navbar-brand span {
        display: inline-block;
        font-size: 0.85rem !important;
        line-height: 1.2;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
    
    /* Sidebar Toggle Button - Fixed Top Left */
    .mobile-sidebar-toggle {
        position: absolute !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .mobile-sidebar-toggle::before {
        content: 'Menú';
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.65rem;
        color: rgba(255,255,255,0.95);
        white-space: nowrap;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0,0,0,0.4);
        letter-spacing: 0.5px;
    }
    
    /* Navbar Toggle Button - Fixed Top Right */
    .navbar-toggler {
        position: absolute !important;
        flex-shrink: 0;
    }
    
    .navbar-toggler::after {
        content: 'Perfil';
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.65rem;
        color: rgba(255,255,255,0.95);
        white-space: nowrap;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0,0,0,0.4);
        letter-spacing: 0.5px;
    }
    
    /* Add extra spacing for the labels */
    .navbar {
        padding-top: 0.75rem !important;
        padding-bottom: 1.75rem !important;
        min-height: 70px;
    }
}

@media (max-width: 576px) {
    /* Extra small screens - adjust padding */
    .navbar .container-fluid {
        padding-left: 75px !important;
        padding-right: 75px !important;
    }
    
    .navbar-brand span {
        font-size: 0.75rem !important;
    }
    
    .navbar-brand img {
        height: 30px !important;
    }
    
    .mobile-sidebar-toggle,
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
        padding: 8px 12px;
    }
    
    .mobile-sidebar-toggle {
        left: 10px !important;
    }
    
    .navbar-toggler {
        right: 10px !important;
    }
}

/* Enhanced Table Responsiveness */
@media (max-width: 768px) {
    /* Better table scrolling */
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    
    /* Compact table styling */
    .table-responsive table {
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        font-size: 0.85rem;
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    /* Action buttons in tables */
    .btn-group-vertical {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Forms optimization */
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Card improvements */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    /* Badges and pills */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
    
    /* Pagination - Compact style for mobile */
    .pagination {
        flex-wrap: wrap;
        font-size: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .pagination .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0.3rem 0.4rem;
    }
    
    /* Alerts */
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .table th,
    .table td {
        font-size: 0.75rem;
        padding: 0.4rem 0.2rem;
    }
    
    /* Stack action buttons */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    /* Smaller modals */
    .modal-content {
        font-size: 0.85rem;
    }
    
    /* Compact headers */
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.35rem; }
    h3, .h3 { font-size: 1.2rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    
    /* Touch-friendly inputs */
    .form-control,
    .form-select,
    .btn {
        min-height: 44px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .school-header {
        padding: 1rem 0;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
}

/* Improve touch targets */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item,
    .page-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Print optimizations */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .alert,
    .mobile-sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
    
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}
