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

/* --- Reset & Basic Styles --- */
:root {
    --ted-red: #e62b1e;
    --dark-bg: #000000;
    --dark-red-bg: #330000; /* A deeper red for the gradient start */
    --card-bg: rgba(40, 10, 10, 0.8); /* Transparent reddish-black for cards */
    --text-white: #ffffff;
    /* Updated Font Stack to Poppins */
    --font-stack: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    /* The classic TEDx Red to Black gradient background */
    background: linear-gradient(to bottom, var(--dark-red-bg), var(--dark-bg) 80%);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 80px; /* push content down for fixed navbar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tedx-red {
    color: var(--ted-red) !important;
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(to right, black, #eb0028);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7);
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.navbar .logo img {
    height: 55px;
    margin-right: 10px;
}

.navbar .logo .tedx-text {
    color: #eb0028;
    font-weight: bold;
}

.navbar .logo .imi-delhi-text {
    color: white;
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: -10px;
    padding: 30px;
}

.navbar ul li {
    margin: 0 20px;
    position: relative; /* Ensures hover effects apply only to the text */
}

.navbar ul li a {
    text-decoration: none;
    color: white; /* Default text color */
    font-size: 18px;
    text-transform: uppercase;
    transition: all 0.3s ease; /* Smooth hover effect */
    background-color: transparent; /* Ensures no background color interferes */
}

.navbar ul li a:hover {
    color: rgb(0, 0, 0); /* Changes text color to black on hover */
    background-color: transparent; /* No background color on hover */
}



/* --- Main Content Formatting --- */
.main-content {
    padding-top: 50px;
    padding-bottom: 80px;
}

/* ================= ABOUT SECTION REVAMPED (Glassy Glow) ================= */
.about-team-section {
    margin-bottom: 80px;
    /* Center the new box */
    display: flex;
    justify-content: center;
}

/* The new glassy container */
.glassy-box {
    /* Semi-transparent dark background with slight red tint */
    background: rgba(20, 5, 5, 0.7); 
    /* Glass effect blur */
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    
    /* Borders and Radius */
    border: 1px solid rgba(235, 0, 40, 0.3);
    border-radius: 20px;
    padding: 50px;
    max-width: 1000px;
    text-align: left;
    
    /* Initial subtle glow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
                inset 0 0 20px rgba(235, 0, 40, 0.1);
    transition: all 0.4s ease;
}

/* Interactive Hover Effect for the Box */
.glassy-box:hover {
    border-color: rgba(235, 0, 40, 0.8);
    /* Stronger neon glow */
    box-shadow: 0 15px 40px rgba(235, 0, 40, 0.3), 
                inset 0 0 30px rgba(235, 0, 40, 0.2);
    transform: translateY(-2px);
}

.animated-heading {
    font-size: 3rem; /* Larger font */
    font-weight: 800;
    margin-bottom: 30px;
    display: flex;
    gap: 15px; 
    overflow: hidden;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.animated-heading.anim-wrapper{
    font-family: "Science Gothic", sans-serif;
}

/* The existing animation wrapper kept intact */
.anim-wrapper {
    display: inline-block;
    animation: slideFadeInOut 6s ease-in-out infinite;
}

@keyframes slideFadeInOut {
    0% { opacity: 0; transform: translateX(-40px); }
    20% { opacity: 1; transform: translateX(0); }
    70% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(40px); }
}

/* Engaging Typography for About Content */
.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e0e0e0; /* Off-white for readability */
    font-weight: 400;
}

/* New class for highlighted phrases */
.highlight-text {
    font-weight: 700;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Ensure TEDx is always red and bold in paragraph */
.about-content .tedx-red {
    font-weight: 800;
    letter-spacing: 0.5px;
}


/* --- Team Grid Section (Typography updates) --- */
.team-grid-section h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
    /* Subtle red gradient text effect */
    background: linear-gradient(to right, white, var(--ted-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid Setup: 4 columns */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* --- Team Card Styling & Shimmer Animation --- */
.team-card {
    background-color: var(--card-bg);
    padding: 15px;
    position: relative;
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; /* Slight rounding */
}

.team-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: rgba(235, 0, 40, 0.3);
}

/* The Shimmer Effect Pseudo-element */
.team-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    transform: rotate(45deg) translate(-100%, -100%);
    transition: transform 0.7s;
    pointer-events: none;
    z-index: 2;
}

.team-card:hover::before {
    transform: rotate(45deg) translate(100%, 100%);
}


.img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.1; 
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #222;
    position: relative;
    z-index: 1;
    border-radius: 4px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Subtle zoom on image hover */
.team-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.member-info {
    text-align: left;
    position: relative;
    z-index: 1;
}

.member-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    color: white;
}

.member-info p {
    font-size: 0.9rem;
    color: var(--ted-red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Footer Section Container */

.footer-section {
    position: relative;
    background: linear-gradient(to bottom, #330000, #000);
    color: white;
    padding: 50px 20px 0;
    text-align: center;
    
    /* CHANGE THIS LINE */
    overflow: visible; /* Was hidden - needs to be visible for popup to show */
}
.footer-bg-clipper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* CRITICAL for background */
    z-index: 0;
    pointer-events: none;
}

/* 3. Adjust the Animated Background to sit inside the clipper */
.animated-background {
    position: absolute;
    top: -50px; /* You can keep this, the clipper will hide the overflow part */
    left: -200px;
    width: 200%;
    height: 300px;
    background: radial-gradient(circle, #eb0028 60%, transparent 60%);
    animation: background 10s linear infinite;
    /* Remove z-index here, controlled by parent */
}

/* Footer Content Wrapper */
.footer-content {
    position: relative;
    z-index: 2;
}

/* Find this in your CSS and update it */
.footer-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 30px;
    
    /* ADD THESE TWO LINES */
    position: relative; 
    z-index: 10; /* Ensures the popup sits on top of the next row */
}

.footer-box {
    text-align: center;
    position: relative;
}

.footer-underline {
    height: 2px;
    width: 80%;
    background: white;
    border-top: 2px dashed white;
    margin: 0 auto 20px;
}

/* Heading Links (if applicable) */
.footer-heading {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.footer-heading a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.footer-heading a:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Whitish transparent background */
}

/* --- SUBTEXT LINKS (Book Ticket / Contact Us) --- */
.footer-subtext {
    font-size: 16px;
    font-weight: 400;
    color: white;
}

.footer-subtext a {
    color: white !important; /* Force white text */
    text-decoration: none !important; /* No underline */
    padding: 5px 12px; /* Add padding so the background looks like a button */
    border-radius: 5px; /* Soft rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block; /* Ensures padding works correctly */
}

/* THE HOVER EFFECT: White text + Translucent Background */
.footer-subtext a:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15); /* The "whitish" background */
    backdrop-filter: blur(2px); /* Optional: adds a slight glass effect */
}

.footer-subtext .arrow {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff; /* Arrow stays red */
    margin-left: 5px;
}

/* Email Section */
.email-section {
    text-align: center;
}

.email-section p {
    font-size: 18px;
    margin-bottom: 20px;
}

.email-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.email-input {
    padding: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: none;
    outline: none;
    border-bottom: 2px solid white;
    background: transparent;
    color: white;
    width: 300px;
}

.email-input::placeholder {
    color: white;
    opacity: 0.8;
}

.submit-button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    background: white;
    color: red;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.submit-button:hover {
    background: red;
    color: white;
}

/* Footer Bottom */
.footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

.footer-left {
    text-align: left;
}

.footer-left h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #e00227;
}

.footer-left p {
    font-size: 14px;
    color: white;
    margin: 5px 0;
}

.social-icons a img {
    width: 24px;
    margin-right: 10px;
    transition: transform 0.3s;
}

.social-icons a img:hover {
    transform: scale(1.2);
}

.footer-right ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-right ul li {
    display: inline;
}

.footer-right ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-right ul li a:hover {
    color: red;
}

.footer-right p {
    font-size: 14px;
    margin-top: 10px;
    color: white;
}

/* Animation Keyframes */
@keyframes background {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* --- CONTACT TOOLTIP STYLES --- */

/* 1. The Wrapper: anchors the absolute tooltip */
.contact-wrapper {
    position: relative; 
    display: inline-block;
    cursor: pointer;
}

/* 2. The Tooltip Box (Hidden by default) */
.contact-tooltip {
    position: absolute;
    bottom: 140%; /* Positions it above the text initially */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Start slightly lower for animation */
    
    width: 320px;
    padding: 25px;
    
    /* THE SHINY BLACKISH LOOK */
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(40, 0, 0, 0.9));
    backdrop-filter: blur(10px); /* Glass blur effect */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle top border */
    border-bottom: 2px solid #eb0028; /* TED Red accent at bottom */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    
    /* Animation State: Hidden */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy effect */
    z-index: 100;
    pointer-events: none; /* Prevents clicking when hidden */
}

/* 3. The Hover Effect (Makes it appear) */
.contact-wrapper:hover .contact-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    bottom: 120%; /* Moves up slightly */
    pointer-events: auto; /* Enables clicking links inside */
}

/* Add a tiny triangle pointer at the bottom of the box */
.contact-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #eb0028 transparent transparent transparent; /* Red pointer */
}

/* --- TOOLTIP CONTENT STYLING --- */

.tooltip-content {
    text-align: left; /* Elegant alignment */
    font-family: 'Montserrat', sans-serif;
    color: white;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.contact-row .icon {
    color: #eb0028; /* Red Icons */
    font-size: 18px;
}

.ted-link {
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #eb0028;
    transition: color 0.3s;
}

.ted-link:hover {
    color: #eb0028;
}

/* Divider Line */
.tooltip-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    margin: 15px 0;
}

/* Thank You Message */
.thank-you-msg {
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: #ddd;
    line-height: 1.4;
}

.thank-you-msg .highlight {
    color: #eb0028;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: 14px;
}

/* ================= RESPONSIVE FIXES (UPDATED) ================= */

/* Tablet View */
@media (max-width: 992px) {
    .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; padding: 15px; }
    .navbar ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    
    body { padding-top: 160px; }
    
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .footer-row { flex-direction: column; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .footer-right ul { justify-content: center; flex-wrap: wrap; }

    /* Footer Background for Mobile */
    .animated-background {
        height: 100%; 
        width: 300%; 
        top: 0;
        left: -100%;
        border-radius: 0;
    }
}

/* Mobile Phones (400px - 480px) */
@media (max-width: 600px) {
    /* 1. Navbar: Big Logo Fix */
    .navbar { 
        padding: 15px 10px; 
        justify-content: center; /* Center items */
    }
    
    .navbar .logo { 
        flex-direction: row; /* Keep image and text side-by-side */
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .navbar .logo img { 
        height: 60px; /* Bigger Logo Image */
        margin-right: 15px;
    }

    /* Target the text specifically to make it BIGGER */
    .navbar .logo .tedx-text {
        font-size: 34px; /* Much Bigger font */
    }
    .navbar .logo .imi-delhi-text {
        font-size: 34px; /* Much Bigger font */
    }

    .navbar ul li { margin: 5px 10px; }
    .navbar ul li a { font-size: 15px; }

    /* 2. Body & Layout - PUSH CONTENT DOWN */
    body { 
        padding-top: 260px; /* Ensures the About box is visible below navbar */
    }
    
    .about-team-section { margin-top: 20px; padding: 0 10px; }
    
    .glassy-box { padding: 20px 15px; width: 100%; border-radius: 15px; }
    
    .animated-heading { font-size: 1.8rem; flex-direction: column; gap: 5px; }
    .about-content p { font-size: 1rem; }

    /* 3. Grid & Forms */
    .team-grid { grid-template-columns: 1fr; }
    .team-grid-section h1 { font-size: 2.2rem; }
    
    .email-form { flex-direction: column; width: 100%; }
    .email-input { width: 100%; margin-bottom: 10px; }
    .submit-button { width: 100%; }

    /* 4. Tooltip Fix */
    .contact-tooltip { width: 280px; left: 50%; transform: translateX(-50%); }
}