/* Eludia Events - Public Frontend Styles - Enhanced Version */

:root {
    --eludia-primary: #095256;
    --eludia-secondary: #0a6b70;
    --eludia-orange: #FF8C42;
    --eludia-gold: #FFB347;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 25px rgba(9, 82, 86, 0.15);
    --shadow-lg: 0 15px 40px rgba(9, 82, 86, 0.2);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.top-bar a {
    transition: var(--transition-fast);
}

.top-bar a:hover {
    color: var(--eludia-primary) !important;
    transform: scale(1.1);
}

/* Navigation */
.navbar {
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.navbar.shadow-lg {
    background: rgba(255, 255, 255, 0.98) !important;
}

.navbar-brand img {
    transition: var(--transition-smooth);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.navbar-brand:hover img {
    transform: scale(1.05) rotate(-2deg);
}

.nav-link {
    font-weight: 500;
    color: #555 !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--eludia-primary), var(--eludia-secondary));
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--eludia-primary) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--eludia-primary), var(--eludia-secondary));
    border: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(9, 82, 86, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--eludia-primary) 0%, var(--eludia-secondary) 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section .lead {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-section .btn-light {
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-section .btn-light:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

/* Section Styles */
.section-padding {
    padding: 100px 0;
    position: relative;
}

.section-title {
    color: var(--eludia-primary);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--eludia-orange), var(--eludia-gold));
    margin-top: 10px;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 60px;
        opacity: 1;
    }
}

.section-subtitle {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: 15px;
    transition: var(--transition-smooth);
    height: 100%;
    box-shadow: var(--shadow-sm);
    background: white;
    overflow: hidden;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(9, 82, 86, 0.05), transparent);
    transition: left 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.service-card .card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--eludia-primary), var(--eludia-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(9, 82, 86, 0.3);
}

.service-card:hover .card-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(9, 82, 86, 0.4);
}

.service-card h4,
.service-card h3 {
    color: var(--eludia-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    transition: var(--transition-fast);
}

.service-card:hover h4,
.service-card:hover h3 {
    color: var(--eludia-secondary);
}

/* Value Pills */
.value-pill {
    background: linear-gradient(135deg, var(--eludia-primary), var(--eludia-secondary));
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    margin: 10px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.value-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.value-pill:hover::before {
    width: 200px;
    height: 200px;
}

.value-pill:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: var(--shadow-md);
}

/* Stats Section */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.stats-card:hover {
    border-color: var(--eludia-primary);
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.stats-card .stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--eludia-primary);
    display: block;
    background: linear-gradient(135deg, var(--eludia-primary), var(--eludia-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card .stat-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* Contact Form */
.contact-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 50px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.contact-form .form-control,
.contact-form .form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 14px;
    transition: var(--transition-fast);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--eludia-primary);
    box-shadow: 0 0 0 0.2rem rgba(9, 82, 86, 0.15);
    transform: translateY(-2px);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--eludia-primary) 0%, var(--eludia-secondary) 100%);
    color: white;
    padding: 80px 0;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section .btn-light {
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition-smooth);
}

.cta-section .btn-light:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
}

.footer h5 {
    color: var(--eludia-orange);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--eludia-orange), var(--eludia-gold));
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: var(--transition-fast);
}

.footer a:hover::after {
    width: 100%;
}

.footer a:hover {
    color: white;
    transform: translateX(3px);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--eludia-primary), var(--eludia-secondary));
    transform: translateY(-5px) rotate(360deg);
}

/* Animations on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .value-pill {
        margin: 5px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }
}

/* Smooth Page Transitions */
body {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--eludia-primary), var(--eludia-secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--eludia-secondary);
}

/* Nav Pills - Auth Modal */
#authModal .nav-pills .nav-link {
    color: #095256 !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 8px;
}
#authModal .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #095256, #097f8c) !important;
    background-color: #095256 !important;
    color: white !important;
}

/* ===== Course Detail — Mobile UX ===== */
@media (max-width: 767.98px) {
    /* Hero: compact padding and smaller title */
    .hero-section { padding: 28px 0 24px !important; }
    .hero-section h1 { font-size: 1.5rem !important; line-height: 1.3; }
    .hero-section .hero-content-wrapper { max-width: 100% !important; }
    .hero-section .d-flex.flex-wrap.gap-3 { font-size: 0.95rem !important; gap: 0.5rem !important; }
    .hero-section .d-flex.flex-wrap.gap-3 i { font-size: 1.1rem !important; }

    /* Roles box: no min-width on mobile */
    .hero-section .d-inline-flex.flex-column { min-width: unset !important; width: 100%; }

    /* Provider ECM box: full width */
    .hero-section .d-inline-flex.align-items-center { width: 100%; }

    /* Razionale: no justify on mobile */
    #razionale .mt-3 { text-align: left !important; }

    /* Program table → card list on mobile */
    .program-table-desktop { display: none !important; }
    .program-mobile-cards { display: block !important; }

    /* Faculty cards: stack vertically */
    .faculty-card-row .col-5,
    .faculty-card-row .col-7 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
    .faculty-card-row .col-5 img,
    .faculty-card-row .col-5 > div { min-height: 160px !important; max-height: 200px; }

    /* Sticky CTA bar at bottom */
    .mobile-sticky-cta {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: white;
        padding: 10px 16px;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
        border-top: 2px solid #5CCDC4;
    }
    .mobile-sticky-cta .btn { font-size: 0.95rem; padding: 10px 0; }

    /* Section titles smaller */
    .section-title { font-size: 1.2rem !important; }

    /* Sidebar cards: tighter on mobile */
    .col-lg-4 .card { margin-bottom: 1rem !important; }
    .col-lg-4 .card-body { padding: 0.75rem !important; }
    .col-lg-4 .card-header h5,
    .col-lg-4 .card-header h6 { font-size: 0.9rem !important; }

    /* Hide quick nav on mobile */
    .col-lg-4 .border-top.mt-4 { display: none; }

    /* Add bottom padding so sticky CTA doesn't cover content */
    body { padding-bottom: 60px; }
}

/* Program mobile cards (hidden on desktop) */
.program-mobile-cards { display: none; }
.program-mobile-card {
    border-left: 3px solid #095256;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}
.program-mobile-card .program-time {
    font-size: 0.8rem;
    color: #095256;
    font-weight: 600;
}
.program-mobile-card .program-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 4px 0;
}
.program-mobile-card .program-desc {
    font-size: 0.82rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Mobile sticky CTA hidden on desktop */
.mobile-sticky-cta { display: none; }
