/*
 * ============================================================================
 * HOME.CSS - Dedicated Stylesheet for Lebanese University Home Page
 * ============================================================================
 * Purpose: Professional, responsive styling for the main landing page
 * 
 * Features:
 * - Modern, clean design suitable for academic institution
 * - Lebanese University branding colors
 * - Fully responsive layout (mobile, tablet, desktop)
 * - Smooth animations and transitions
 * - Extensible navigation menu styling
 * - Professional hero section with background
 * 
 * Color Scheme:
 * - Primary: Lebanese University colors (red, white, green accents)
 * - Secondary: Professional grays and blues
 * - Accent: Gold/amber for highlights
 * ============================================================================
 */

/* ============================================================================
   SECTION 1: CSS RESET & ROOT VARIABLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Lebanese University Brand Colors */
    --lu-red: #c41e3a;
    --lu-green: #00563f;
    --lu-gold: #d4af37;
    
    /* Primary Colors */
    --primary-color: #c41e3a;          /* LU Red */
    --primary-hover: #9a1529;
    --secondary-color: #00563f;        /* LU Green */
    --accent-color: #d4af37;           /* Gold accent */
    
    /* Neutral Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #6b6b6b;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #e0e0e0;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.18);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                   'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji';
    --font-arabic: 'Segoe UI', 'Traditional Arabic', 'Arabic Typesetting', 
                   Tahoma, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container Width */
    --container-max-width: 1400px;
}

/* ============================================================================
   SECTION 2: GLOBAL STYLES
   ============================================================================ */

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Arabic text styling */
.hero-title-ar,
.brand-subtitle,
[lang="ar"] {
    font-family: var(--font-arabic);
    direction: rtl;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

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

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

/* ============================================================================
   SECTION 3: NAVIGATION HEADER
   ============================================================================ */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--background-white);
    box-shadow: var(--shadow-sm);
    border-bottom: 3px solid var(--primary-color);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    gap: var(--spacing-lg);
}

/* Brand Section (Logo + Text) */
.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.nav-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--background-white);
}

.nav-link.active:hover {
    background-color: var(--primary-hover);
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.link-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.link-text {
    line-height: 1;
}

/* Mobile Menu Toggle (Hidden by default) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-color);
}

.hamburger-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: all var(--transition-fast);
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: all var(--transition-fast);
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.mobile-menu-toggle:hover .hamburger-icon,
.mobile-menu-toggle:hover .hamburger-icon::before,
.mobile-menu-toggle:hover .hamburger-icon::after {
    background-color: var(--background-white);
}

/* Mobile menu open state */
.nav-menu.active {
    display: flex;
}

/* ============================================================================
   SECTION 4: HERO SECTION
   ============================================================================ */

.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xxl) var(--spacing-md);
    background: linear-gradient(135deg, #c41e3a 0%, #9a1529 50%, #00563f 100%);
    /* Alternative: Use a background image */
    /* background-image: url('path-to-university-building.jpg'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

/* Hero overlay for better text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(196, 30, 58, 0.85) 0%,
        rgba(154, 21, 41, 0.9) 50%,
        rgba(0, 86, 63, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
    color: var(--background-white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-title-ar {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    line-height: 1.3;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ============================================================================
   SECTION 5: BUTTONS
   ============================================================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--background-white);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    background-color: var(--accent-color);
    color: var(--background-white);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
}

.btn-arrow {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

/* ============================================================================
   SECTION 6: SERVICES SECTION
   ============================================================================ */

.services-section {
    padding: var(--spacing-xxl) var(--spacing-md);
    background-color: var(--background-white);
}

.services-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* Service Card Styles */
.service-card {
    background-color: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.service-card.coming-soon {
    opacity: 0.7;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.card-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: all var(--transition-fast);
}

.card-link:hover {
    gap: 0.75rem;
    color: var(--primary-hover);
}

.card-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: var(--background-white);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   SECTION 7: INFORMATION SECTION
   ============================================================================ */

.info-section {
    padding: var(--spacing-xxl) var(--spacing-md);
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
}

.info-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.info-block {
    text-align: center;
    padding: var(--spacing-lg);
}

.info-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

.info-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.info-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   SECTION 8: FOOTER
   ============================================================================ */

.main-footer {
    background-color: var(--text-primary);
    color: var(--background-white);
    padding: var(--spacing-xl) var(--spacing-md);
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-color);
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--background-white);
    opacity: 0.9;
    transition: all var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================================================
   SECTION 9: ANIMATIONS (using data-aos attributes)
   ============================================================================ */

[data-aos] {
    opacity: 0;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* ============================================================================
   SECTION 10: RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title-ar {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .brand-text {
        display: none;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    /* Navigation - Mobile Menu */
    .nav-container {
        flex-wrap: wrap;
        min-height: 70px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        gap: 0;
        padding: var(--spacing-md) 0;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem var(--spacing-md);
        border-radius: 0;
        justify-content: flex-start;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 500px;
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title-ar {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn-primary {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1.05rem;
    }
    
    /* Services Section */
    .services-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Info Section */
    .info-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    .nav-logo {
        height: 50px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-title-ar {
        font-size: 1.35rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-description {
        font-size: 0.95rem;
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
}

/* ============================================================================
   SECTION 11: PRINT STYLES
   ============================================================================ */

@media print {
    .main-header,
    .hero-actions,
    .mobile-menu-toggle,
    .main-footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
    
    .service-card {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   SECTION 12: ACCESSIBILITY & FOCUS STYLES
   ============================================================================ */

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

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

/* ============================================================================
   END OF STYLESHEET
   ============================================================================
   
   CUSTOMIZATION NOTES:
   
   1. COLORS:
      - Modify CSS custom properties in :root to change the color scheme
      - Main brand colors: --lu-red, --lu-green, --lu-gold
   
   2. HERO BACKGROUND:
      - Uncomment the background-image line in .hero-section
      - Replace with path to your university building image
      - Adjust opacity in .hero-overlay for readability
   
   3. SPACING:
      - All spacing uses CSS variables (--spacing-*)
      - Modify in :root to adjust globally
   
   4. FONTS:
      - Change --font-family for Latin text
      - Change --font-arabic for Arabic text
      - Add custom fonts via @font-face if needed
   
   5. RESPONSIVE BREAKPOINTS:
      - 992px: Tablet landscape
      - 768px: Mobile menu activation
      - 480px: Small mobile adjustments
   
   6. ANIMATIONS:
      - Uses data-aos attributes for scroll animations
      - Controlled by home.js
      - Respects prefers-reduced-motion
   
   7. EXTENSIBILITY:
      - Add new service cards: Style follows .service-card
      - Add new menu items: Style follows .nav-link
      - Maintain consistent spacing with CSS variables
   ============================================================================
 */
