/* Custom Navigation Styles */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem; /* Creates a small gap */
    min-width: 100%; /* Ensures dropdown is at least as wide as its parent */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

/* Prevents layout shift by ensuring consistent spacing */
.navbar-nav .nav-link {
    padding-top: 1rem;
    padding-bottom: 1rem;
}


/* Enhanced UI/UX and Responsive Design - Dai Hoi Dang Website */

/* ===== ENHANCED TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Enhanced Color Palette */
    --primary-red: #d32f2f;
    --primary-red-dark: #b71c1c;
    --primary-red-light: #ef5350;
    --accent-gold: #ffeb3b;
    --accent-gold-dark: #ffc107;

    /* Semantic Colors */
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;

    /* Text Colors with Better Contrast */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #757575;
    --text-light: #9e9e9e;
    --text-inverse: #ffffff;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e3f2fd;
    --bg-dark: #212121;

    /* Enhanced Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ENHANCED BASE STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    /* color: var(--text-primary); */
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== ENHANCED TYPOGRAPHY SCALE ===== */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

/* ===== ENHANCED BUTTONS ===== */
.btn-enhanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Accessibility - minimum touch target */

    /* Focus styles for accessibility */
    &:focus-visible {
        outline: 2px solid var(--primary-red);
        outline-offset: 2px;
    }

    /* Disabled state */
    &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }
}

.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);

    &:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, var(--primary-red-dark), #8b0000);
    }

    &:active {
        transform: translateY(0);
        box-shadow: var(--shadow-sm);
    }
}

.btn-secondary-enhanced {
    background: var(--bg-primary);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    box-shadow: var(--shadow-sm);

    &:hover:not(:disabled) {
        background: var(--primary-red);
        color: var(--text-inverse);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.btn-ghost-enhanced {
    background: transparent;
    color: var(--primary-red);
    border: 1px solid transparent;

    &:hover:not(:disabled) {
        background: rgba(211, 47, 47, 0.1);
        border-color: var(--primary-red);
    }
}

/* ===== ENHANCED CARDS ===== */
.card-enhanced {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    overflow: hidden;

    &:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
        border-color: rgba(211, 47, 47, 0.2);
    }
}

.card-header-enhanced {
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
}

.card-body-enhanced {
    padding: var(--space-xl);
}

.card-footer-enhanced {
    padding: var(--space-xl);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary);
}

/* ===== ENHANCED FORMS ===== */
.form-group-enhanced {
    margin-bottom: var(--space-lg);
}

.form-label-enhanced {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

.form-input-enhanced {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--bg-primary);

    &:focus {
        outline: none;
        border-color: var(--primary-red);
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    }

    &:invalid {
        border-color: var(--error);
    }

    &::placeholder {
        color: var(--text-light);
    }
}

/* ===== ENHANCED NAVIGATION ===== */
.nav-enhanced {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link-enhanced {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);

    &:hover {
        color: var(--primary-red);
        background: rgba(211, 47, 47, 0.05);
    }

    &.active {
        color: var(--primary-red);
        background: rgba(211, 47, 47, 0.1);

        &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 24px;
            height: 2px;
            background: var(--primary-red);
            border-radius: var(--radius-full);
        }
    }
}

/* ===== ENHANCED MODALS ===== */
.modal-enhanced {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);

    &.active {
        opacity: 1;
        visibility: visible;
    }
}

.modal-content-enhanced {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);

    .modal-enhanced.active & {
        transform: scale(1);
    }
}

/* ===== ENHANCED NOTIFICATIONS ===== */
.notification-enhanced {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1100;
    min-width: 300px;
    max-width: 400px;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform var(--transition-normal);

    &.show {
        transform: translateX(0);
    }

    &.success {
        background: rgba(76, 175, 80, 0.95);
        color: var(--text-inverse);
        border-left: 4px solid var(--success);
    }

    &.error {
        background: rgba(244, 67, 54, 0.95);
        color: var(--text-inverse);
        border-left: 4px solid var(--error);
    }

    &.warning {
        background: rgba(255, 152, 0, 0.95);
        color: var(--text-inverse);
        border-left: 4px solid var(--warning);
    }

    &.info {
        background: rgba(33, 150, 243, 0.95);
        color: var(--text-inverse);
        border-left: 4px solid var(--info);
    }
}

/* ===== ENHANCED LOADING STATES ===== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
    color: var(--text-secondary);
}

.spinner-enhanced {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(211, 47, 47, 0.2);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ENHANCED RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 640px) {
    :root {
        --space-md: 0.75rem;
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }

    .text-4xl { font-size: 1.875rem; line-height: 2.25rem; }
    .text-5xl { font-size: 2.25rem; line-height: 2.5rem; }
    .text-6xl { font-size: 3rem; line-height: 1; }

    .btn-enhanced {
        width: 100%;
        justify-content: center;
    }

    .notification-enhanced {
        left: var(--space-md);
        right: var(--space-md);
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .card-enhanced {
        margin-bottom: var(--space-lg);
    }

    .modal-content-enhanced {
        margin: var(--space-md);
        max-width: calc(100vw - 2rem);
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --primary-red: #cc0000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e5e5e5;
        --text-muted: #a3a3a3;
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #404040;
    }

    .card-enhanced {
        background: var(--bg-secondary);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .form-input-enhanced {
        background: var(--bg-secondary);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }
}



/* ===== ENHANCED INFO CARDS ===== */
.info-card {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    height: 100%;
}

.info-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-xl);
    border-color: rgba(211, 47, 47, 0.2);
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.info-card:hover .info-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-2xl);
}

.info-icon i {
    font-size: 2.5rem;
    color: var(--text-inverse);
}

.info-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}



/* ===== ENHANCED ABOUT SECTION ===== */
.about-section {
    padding: 20px 0;
}

.about-section .section-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}



.about-intro {
    font-size: 1.1rem;
    color: #4a4a4a;
    line-height: 1.7;
    text-align: left;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    /* .about-text,
    .about-image {
        max-width: 100%;
    }

    .about-text {
        margin-bottom: 30px;
        text-align: center;
    } */

    .about-intro {
        text-align: center;
    }
}
