/* =========================================
   SENTEC 2025 - ULTRA DARK GLASS THEME (FINAL FIXED)
   ========================================= */

/* --- 0. CONFIG & VARIABLES --- */
:root {
    --bg: #030303;            /* Pure Black Background */
    --surface: #0E0E0E;       /* Slightly lighter for cards */
    --accent: #00FF94;        /* Neon Cyber Green */
    --text-main: #FFFFFF;     /* White Text */
    --text-muted: #cccccc;    /* Bright Grey */
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* UNIFIED GLASS SETTINGS */
    --glass-bg: rgba(255, 255, 255, 0.03); 
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

::selection { background: var(--accent); color: #000; }
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; }

/* Global media defaults for responsiveness */
img, video { max-width: 100%; height: auto; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    display: flex; flex-direction: column; min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, #111a2e 0%, #030303 60%);
}

/* Remove underline on button-like links globally */
a.btn, a.btn-clear, a.btn-neon, .btn, .btn-clear, .btn-neon, button {
    text-decoration: none !important;
}
a.btn:hover, a.btn-clear:hover, a.btn-neon:hover, .btn:hover, .btn-clear:hover, .btn-neon:hover, button:hover {
    text-decoration: none !important;
}

/* --- 1. NAVIGATION --- */
nav {
    position: fixed; top: 0; width: 100%; padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 2000; /* higher so dropdown can layer above other content */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    overflow: visible; /* ensure absolutely positioned dropdowns are not clipped */
}

/* Animate hamburger icon when open */
.menu-toggle { display:none; }
.menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity:0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav overlay and slide animation */
.nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 999; opacity: 0; transition: opacity 0.25s ease;
}
body.nav-open .nav-overlay { opacity: 1; }

.nav-logo {
    font-family: 'Outfit', sans-serif; 
    font-weight: 800; font-size: 2rem; color: #fff; 
    letter-spacing: -1px; text-decoration: none; transition: 0.3s;
}
.nav-logo:hover { color: #fff; transform: scale(1.05); }
.nav-logo span { color: var(--accent); font-size: 2.5rem; line-height: 0; }

.nav-links { display: flex; gap: 30px; list-style: none; margin-bottom: 0; overflow: visible; }
.nav-links > li { position: relative; }
.nav-links a {
    text-decoration: none; color: #ddd; font-weight: 600;
    font-size: 0.95rem; transition: 0.3s; position: relative;
}
.nav-links a:hover { color: #fff; text-shadow: 0 0 10px rgba(0, 255, 148, 0.5); }
.nav-links > li > a::after {
    content: ''; position: absolute; width: 0%; height: 2px;
    bottom: -5px; left: 0; background-color: var(--accent); transition: 0.3s;
}
.nav-links > li > a:hover::after { width: 100%; }

/* --- DROPDOWN MENU (FIXED) --- */
.nav-dropdown { position: relative; }

.dropdown-toggle { 
    cursor: pointer; 
    display: flex; align-items: center; gap: 5px; 
}

.dropdown-toggle i { 
    font-size: 0.7rem; 
    transition: transform 0.3s; 
}

/* Rotate arrow when open */
.nav-dropdown:hover .dropdown-toggle i,
.nav-dropdown.active .dropdown-toggle i { 
    transform: rotate(180deg); 
}

.dropdown-menu {
    position: absolute; 
    top: 100%; 
    left: 50%; 
    transform: translateX(-50%) translateY(10px);
    
    background: rgba(18, 20, 24, 0.98); 
    backdrop-filter: blur(22px);
    border: 1px solid rgba(0, 255, 148, 0.25);
    border-radius: 12px; 
    padding: 10px 0;
    min-width: 240px; 
    list-style: none;
    
    /* Hidden by default */
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
    
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55); 
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    z-index: 3000;
}

/* SHOW MENU (On Hover OR when 'active' class is added) */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateX(-50%) translateY(15px); 
    pointer-events: all;
}

.dropdown-menu li { padding: 0; margin: 0; display: block; width: 100%; }

.dropdown-menu a {
    display: flex !important; 
    align-items: center; 
    gap: 10px;
    padding: 12px 20px; 
    color: #ccc !important;
    font-size: 0.95rem; 
    font-weight: 500;
    transition: all 0.2s; 
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(0, 255, 148, 0.1);
    border-left-color: var(--accent);
    color: #fff !important;
    padding-left: 25px;
}

/* Little Triangle Tip */
.dropdown-menu::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px; background: rgba(18, 20, 24, 0.98);
    border-left: 1px solid rgba(0, 255, 148, 0.25); border-top: 1px solid rgba(0, 255, 148, 0.25);
}



/* --- 2. HERO SECTION --- */
.hero-section {
    height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; position: relative;
    text-align: center; padding-top: 60px;
}
.bg-slideshow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 2s ease-in-out, transform 8s linear;
    filter: brightness(0.5); transform: scale(1);
}
.slide.active { opacity: 1; transform: scale(1.05); }
.overlay-gradient {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, #030303 100%);
    z-index: -1; pointer-events: none;
}
h1 {
    font-family: var(--font-head); 
    font-size: clamp(2rem, 6.5vw, 5.5rem); font-weight: 800; line-height: 1.05; margin-bottom: 16px;
    color: #FFFFFF; text-shadow: 0 0 50px rgba(0,0,0,0.8);
}
.pill {
    border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.6);
    padding: 6px 14px; border-radius: 50px; font-size: 0.85rem;
    color: var(--accent); text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 18px; font-weight: 600; backdrop-filter: blur(10px);
}


/* --- 3. SECTIONS GLOBAL --- */
section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }

.section-header { text-align: left; margin-bottom: 50px; }
.section-header h2 {
    font-family: var(--font-head); font-size: 3rem; font-weight: 700;
    color: #fff; text-transform: uppercase; letter-spacing: 1px;
}
.section-header h2::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--accent); margin-top: 15px; box-shadow: 0 0 15px var(--accent);
}


/* --- 4. ABOUT US (FIXED VISIBILITY) --- */
.highlight-text-container {
    font-size: 1.8rem; font-weight: 500; line-height: 1.6; 
    color: #888; /* Lighter base color so it's visible before animation */
    text-align: justify;
}
.highlight-word { transition: color 0.5s ease, text-shadow 0.5s ease; }
.highlight-word.lit { color: #fff; text-shadow: 0 0 15px rgba(255,255,255,0.2); }
.highlight-word.accent { color: var(--accent); text-shadow: 0 0 20px rgba(0, 255, 148, 0.4); }


/* --- 5. FACULTY CARD (UNIFIED GLASS STYLE) --- */
.profile-card {
    display: flex; align-items: center; gap: 60px;
    /* Changed to match Glass Panel style exactly */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    
    padding: 50px; border-radius: 30px;
    position: relative; overflow: visible;
    width: 100%; /* Ensure it fills container */
}

.profile-img {
    width: 450px; height: 300px; 
    border-radius: 20px; object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    flex-shrink: 0; z-index: 2;
}
.profile-glow {
    position: absolute; left: 80px; top: 80px; width: 450px; height: 300px;
    background: var(--accent); filter: blur(120px); opacity: 0.15; z-index: 1;
}
.faculty-content { position: relative; z-index: 2; flex-grow: 1; }
.quote-icon-new { font-size: 4rem; color: var(--accent); margin-bottom: 20px; display: block; }
.profile-quote {
    font-size: 1.4rem; line-height: 1.6; color: #ccc; font-weight: 300;
    margin-bottom: 30px; font-family: var(--font-body);
    text-align: justify; text-align-last: left; hyphens: auto;
}
.faculty-name {
    font-family: var(--font-head); font-size: 1.4rem; font-weight: 700;
    color: #fff; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px;
}
.faculty-designation {
    color: var(--accent); font-size: 0.9rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px; display: block;
}


/* --- 6. EVENTS & CONTACT CONTAINERS (GLASS PANELS) --- */
/* Unified wrapper style for Events and Contact */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 50px; border-radius: 24px;
    margin-bottom: 40px;
    width: 100%; /* Fill container width */
    display: block;
}

/* Events Grid inside the Glass Box */
.event-card {
    display: flex; flex-direction: column; text-align: left;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px; border-radius: 20px; 
    transition: 0.4s ease; height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.event-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.event-card .event-image-wrapper {
    width: 100%;
    aspect-ratio: 1080 / 1350; /* Match the portrait ratio */
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Show full image without cropping */
    border-radius: 16px; 
}
.event-card h3 { color: #fff; font-size: 1.5rem; margin: 10px 0; }
.event-card .date { color: var(--accent); font-size: 0.9rem; font-weight: bold; letter-spacing: 1px; }
.event-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* Contact Layout */
.contact-layout {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: start;
}
.contact-left h2 {
    font-size: 3.5rem; font-family: var(--font-head); font-weight: 800;
    margin-bottom: 20px; color:#fff; line-height: 1.1;
}
.contact-left p { color: var(--text-muted); margin-bottom: 40px; font-size: 1.1rem; }
.contact-btn { display:inline-block; text-align:center; padding: 15px 40px; font-size: 1.1rem; }

/* FAQ Items (FIXED VISIBILITY) */
.faq-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px; border-radius: 12px; overflow: hidden;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
    padding: 20px; cursor: pointer; font-weight: 600; 
    color: #fff !important; /* Force white text */
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item p { padding: 0 20px 20px 20px; color: #bbb; margin: 0; }
.faq-item summary::after { content: '+'; color: var(--accent); font-size: 1.5rem; line-height: 1; }
.faq-item[open] summary::after { content: '-'; }


/* --- 7. FOOTER --- */
footer {
    background: #000; border-top: 1px solid #222; padding: 60px 20px 30px;
    text-align: center; position: relative; z-index: 10; margin-top: auto;
}
.social-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-icon {
    width: 45px; height: 45px; border-radius: 50%; background: #111;
    display: flex; align-items: center; justify-content: center;
    color: #888; font-size: 1.1rem; text-decoration: none;
    transition: 0.3s; border: 1px solid #222;
}
.social-icon:hover { background: var(--accent); color: #000; transform: translateY(-3px); box-shadow: 0 0 15px rgba(0, 255, 148, 0.4); }
.footer-text { color: #555; font-size: 0.9rem; }

/* --- 8. UTILITIES --- */
.bg-light, .bg-white { background-color: transparent !important; }
.text-dark { color: #fff !important; }

/* Buttons & Inputs */
.btn-clear {
    background: transparent !important; border: 2px solid var(--accent) !important;
    color: #fff !important; padding: 12px 40px; border-radius: 10px; font-weight: 700; text-transform: uppercase;
}
.btn-clear:hover { background: var(--accent) !important; color: #000 !important; box-shadow: 0 0 20px rgba(0, 255, 148, 0.4); }

.form-control-dark {
    background-color: #0b1120 !important; border: 1px solid #333 !important; color: #fff !important; padding: 12px !important;
}
input[type="file"]::file-selector-button {
    background-color: transparent !important; border: 1px solid var(--accent) !important; color: var(--accent) !important; padding: 8px 20px;
}

/* --- 9. MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    /* Menu Toggle */
    .menu-toggle { display: block; cursor: pointer; }
    .bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: white; }
    
    /* Nav Links */
    .nav-links {
        position: fixed; left: -100%; top: 70px; gap: 0;
        flex-direction: column; background-color: rgba(0,0,0,0.95);
        width: 100%; text-align: center; transition: 0.3s; padding: 20px 0;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-links li { padding: 6px 0; }
    .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; line-height: 1.3; }
    .nav-links .nav-btn { margin: 6px auto; display: inline-block; padding: 10px 18px; }
    .nav-links.active { left: 0; }
    
    /* Center Alignment */
    .section-header, .highlight-text-container, .event-card, .contact-left, .profile-card { 
        text-align: center !important; 
    }
    .section-header h2::after { margin: 15px auto 0 auto; }
    
    h1 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); }
    nav { justify-content: space-between; padding: 15px 20px; }
    
    .profile-card { flex-direction: column; gap: 30px; padding: 30px; }
    .profile-img { width: 100%; max-width: 520px; height: auto; aspect-ratio: 16/9; }
    .profile-glow { left: 50%; transform: translateX(-50%); width: 100%; }
    .quote-icon-new { margin: 0 auto 20px auto; }

    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .glass-panel { padding: 30px; }
    .contact-left h2 { font-size: clamp(1.5rem, 6vw, 2.2rem); margin-bottom: 14px; line-height: 1.15; }
    .contact-left p { margin-bottom: 28px; font-size: 1rem; }
    .contact-btn { margin: 0 auto; display: block; }
}

/* Extra small phones */
@media (max-width: 480px) {
    nav { padding: 12px 16px; }
    .nav-logo { font-size: 1.4rem; }
    .nav-logo span { font-size: 1.8rem; }

    /* Prevent iOS focus zoom by keeping input font-size >= 16px */
    input, textarea, select,
    .form-control-dark, .form-select-dark { font-size: 16px !important; }

    /* reCAPTCHA container fits mobile width */
    .g-recaptcha { transform-origin: 0 0; }

    section { padding: 60px 14px; }
    .section-header h2 { font-size: clamp(1.2rem, 5.5vw, 1.6rem); }
    .highlight-text-container { font-size: 0.98rem; line-height: 1.6; }

    .event-card { padding: 14px; }
    .event-card .event-image-wrapper { 
        aspect-ratio: 1080 / 1350; /* Keep portrait ratio on mobile */
    }
    .event-card img { object-fit: contain; }
    .event-card h3 { font-size: 1.1rem; }
    .event-card p { font-size: 0.9rem; }

    .glass-panel { padding: 18px; }

    .profile-card { padding: 18px; border-radius: 18px; }
    .quote-icon-new { font-size: 2.6rem; }
    .profile-quote { font-size: 0.98rem; }

    /* Better mobile justification: enable hyphenation and limit measure */
    .profile-quote,
    .highlight-text-container {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        word-break: normal;
        overflow-wrap: break-word;
    }
    /* Keep last line left; reduce line length to avoid wide gaps */
    .profile-quote {
        text-align-last: left;
        max-width: 36ch;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
    }

    /* Keep faculty name to one line on phones */
    .faculty-name {
        font-size: clamp(0.95rem, 4vw, 1.15rem);
        letter-spacing: 0.5px;
        white-space: nowrap;
    }

    /* Make designation smaller and less spread than name */
    .faculty-designation {
        font-size: clamp(0.68rem, 3vw, 0.85rem);
        letter-spacing: 0.8px;
        white-space: nowrap;
        display: inline-block;
        opacity: 0.95;
    }

    /* Page: Registration */
    .registration-section { padding-top: 110px; padding-bottom: 50px; }
    .registration-section h2 { font-size: clamp(1.4rem, 6vw, 1.8rem) !important; }
    .glass-box { padding: 18px !important; border-radius: 18px !important; }
    .inst-btn { padding: 16px !important; }
    .inst-btn i { font-size: 2rem !important; }
    .inst-btn h5 { font-size: 1rem !important; }
    #step2 .section-title { font-size: 1rem; }
    .form-control-dark, .form-select-dark { padding: 10px 12px !important; }
    #resultModal .modal-content { margin: 0 10px; }

    /* Page: Gallery */
    #gallery .glass-panel .row > [class*="col-"] { margin-top: 6px; }
    #gallery .glass-panel p { 
        text-align: justify; 
        text-justify: inter-word; 
        hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; 
        text-align-last: left; 
        max-width: 38ch; 
        margin-left: auto; margin-right: auto;
    }
    #gallery select.form-select { width: 100% !important; }
}
