/* ========================================
   Express Education - Modern Styles
   ======================================== */

/* CSS Variables - Chamberlain-Inspired Design */
:root {
    /* Primary Colors - Deep Navy Blue */
    --primary-color: #003057;
    --primary-hover: #002045;
    --primary-light: #e6eef5;
    
    /* Secondary/Accent - Warm Orange/Coral */
    --secondary-color: #ff6b35;
    --secondary-hover: #e55a2b;
    --accent-color: #ff8c5a;
    
    /* Neutral Colors */
    --text-color: #333333;
    --light-gray: #f5f7f9;
    --medium-gray: #e0e7ed;
    --dark-gray: #6c757d;
    --border-color: #d8d8d8;
    
    /* Status Colors */
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    
    /* Typography - Modern, clean fonts */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.7;
    
    /* Spacing & Layout */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 4px 12px rgba(0, 48, 87, 0.08);
    --box-shadow-hover: 0 8px 24px rgba(0, 48, 87, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --container-width: 1400px;
    --header-height: 80px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--medium-gray);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
}

h1 { 
    font-size: 2.75rem;
    letter-spacing: -0.5px;
}
h2 { 
    font-size: 2.25rem;
    letter-spacing: -0.25px;
}
h3 { 
    font-size: 1.875rem;
}
h4 { 
    font-size: 1.5rem;
}
h5 { 
    font-size: 1.25rem;
}
h6 { 
    font-size: 1.125rem;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-content {
    flex: 1;
    background-color: #fff;
}

/* Header */
.site-header {
    background-color: #fff;
    border-top: 5px solid var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 48, 87, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    min-height: var(--header-height);
}

.logo {
    flex: 0 0 auto;
    min-width: 200px;
}

.logo img {
    max-height: 70px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

/* Dropdown Menu */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu .dropdown-toggle::before {
    content: '▾';
    font-size: 1rem;
    order: 2;
}

.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 48, 87, 0.15);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0;
    list-style: none;
    z-index: 1000;
}

.nav-menu .dropdown:hover .dropdown-menu {
    display: block;
}

.nav-menu .dropdown-menu li {
    width: 100%;
}

.nav-menu .dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
}

.nav-menu .dropdown-menu a::after {
    display: none;
}

.nav-menu .dropdown-menu a:hover {
    background-color: var(--light-gray);
}

.btn-login {
    background-color: var(--secondary-color);
    color: #fff !important;
    padding: 0.625rem 1.75rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius);
}

.btn-login:hover {
    background-color: var(--secondary-color);
}

/* User Menu Dropdown */
.nav-menu .user-menu .user-dropdown {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: var(--border-radius);
}

.nav-menu .user-menu .user-dropdown:hover {
    background-color: #0056a3;
}

.nav-menu .user-menu .user-dropdown::after {
    display: none;
}

.nav-menu .user-menu .user-dropdown i {
    margin-right: 0.5rem;
}

.nav-menu .user-menu .dropdown-menu {
    right: 0;
    left: auto;
}

.nav-menu .user-menu .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu .user-menu .dropdown-menu a i {
    width: 18px;
    text-align: center;
    color: var(--secondary-color);
}

/* Cart Link */
.nav-menu .cart-link {
    position: relative;
}

.nav-menu .cart-link .cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav-menu .cart-link .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-menu .cart-link .cart-icon:hover {
    color: var(--secondary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 0;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: var(--error-color);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 48, 87, 0.15);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 48, 87, 0.25);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-label.required::after {
    content: ' *';
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 48, 87, 0.1);
}

select,
select.form-control {
    padding: 0.56rem 0.75rem !important;
    line-height: 1.5 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control.error {
    border-color: var(--error-color);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    height: calc(1.5em + 1.75rem + 4px); /* Match input height exactly */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 48, 87, 0.05);
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004670 100%);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px rgba(0, 48, 87, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 48, 87, 0.15);
    transform: translateY(-4px);
}

.card-header {
    padding: 2rem;
    border-bottom: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004670 100%);
    color: #fff;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-weight: 700;
}

.card-body {
    padding: 2rem;
}

.card-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.col {
    flex: 1;
}

.col-6 {
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
}

.col-8 {
    flex: 0 0 calc(66.666% - 20px);
    max-width: calc(66.666% - 20px);
}

.col-4 {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
}

.col-3 {
    flex: 0 0 calc(25% - 22.5px);
    max-width: calc(25% - 22.5px);
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #001a2e 100%);
    color: #fff;
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: #fff;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.footer-col a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive Design */
@media (max-width: 1400px) and (min-width: 1025px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        letter-spacing: 0.25px;
    }
}

@media (max-width: 1024px) {
    :root {
        --font-size-base: 14px;
        --header-height: 70px;
    }
    
    .site-header {
        border-top: 3px solid var(--secondary-color);
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo {
        min-width: 180px;
    }
    
    .logo img {
        max-height: 60px;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 8px 16px rgba(0, 48, 87, 0.15);
        gap: 0;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    /* Mobile Dropdown */
    .nav-menu .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: var(--light-gray);
        margin: 0;
        padding: 0;
        border-radius: 0;
    }
    
    .nav-menu .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .nav-menu .dropdown-menu li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu .dropdown-menu a {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }
    
    .btn-login {
        margin: 0.5rem 1rem;
        text-align: center;
    }
    
    .row {
        flex-direction: column;
        margin: 0;
    }
    
    .col,
    .col-3,
    .col-4,
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Mobile: floated blocks stack naturally */
    .float-block {
        float: none !important;
        max-width: 100% !important;
        margin: 0 0 2rem 0 !important;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 13px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        width: 100%;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .card-header h2,
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}
