/* style.css - MeghdootLab - Personal Tech Training Center (Kolkata, 2026) */
/* Updated: Better visibility & animation reliability */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: linear-gradient(-45deg, #536DFE, #7C4DFF, #448AFF, #303F9F);
    background-size: 400% 400%;
    color: white;
    min-height: 100vh;
    text-align: center;
    line-height: 1.6;
    animation: gradientBG 24s ease infinite;
}

/* ────────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────────── */

@keyframes gradientBG {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(0.6deg); }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50%      { border-color: #FFEB3B; }
}

@keyframes shine {
    0%   { transform: translateX(-120%) skewX(-25deg); }
    25%  { transform: translateX(120%)  skewX(-25deg); }
    100% { transform: translateX(120%)  skewX(-25deg); }
}

@keyframes pulseText {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.3); }
}

@keyframes successPop {
    0%   { transform: translate(-50%, -40%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ────────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────────── */
/* Updated Popup Styles */
.popup-message {
    display: none; 
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2e7d32; 
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Deeper shadow for "dialog" look */
    z-index: 9999; /* Ensure it is above EVERYTHING */
    font-weight: bold;
    text-align: center;
    min-width: 300px;
    /* Add this animation */
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ensure the keyframe exists (you have it, but make sure it matches) */

nav {
    position: sticky;
    top: 0;
    background: rgba(83, 109, 254, 0.94);
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}

.logo {
    font-size: 2.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #FFEB3B;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

nav a:hover,
nav a:focus {
    color: #FFEB3B;
    animation: pulseText 1.8s infinite;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #FFEB3B;
    transition: width 0.4s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────── */

header {
    padding: 9rem 5% 6rem;
}

header h1 {
    font-size: 4.5rem;
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 4px solid #FFEB3B;
    width: 0;
    /* REDUCED DELAYS BELOW */
    animation: 
        typing 0.8s steps(13) forwards, /* Faster typing (was 1.2s) */
        blink 0.7s step-end infinite,
        fadeInUp 0.8s ease-out 0.5s forwards; /* Reduced delay to 0.5s (was 1.5s) */
    opacity: 0;
    transform: translateY(50px);
}

.tagline {
    font-size: 1.8rem;
    color: #FFEB3B;
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeInUp 0.2s ease-out 1.2s forwards;
    transform: translateY(40px);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 4.8s forwards;
    transform: translateY(40px);
}

.cta-btn {
    position: relative;
    display: inline-block;
    background: #FFEB3B;
    color: #111;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.35s ease;
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.4);
    background: #FFD54F;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-25deg);
    animation: shine 3.5s infinite;
}

/* ────────────────────────────────────────────────
   SECTIONS & CARDS
───────────────────────────────────────────────── */

section {
    padding: 5rem 5%;
}

h2 {
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
}

.section-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.grid,
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}

.card,
.benefit-card {
    background: rgba(255,255,255,0.12);
    padding: 1.8rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.9s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.35s; }
.card:nth-child(3) { animation-delay: 0.5s;  }
.card:nth-child(4) { animation-delay: 0.65s; }
.card:nth-child(5) { animation-delay: 0.8s;  }
.card:nth-child(6) { animation-delay: 0.95s; }

.card.visible,
.benefit-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.card:hover,
.benefit-card:hover {
    transform: translateY(-12px);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.card h3,
.benefit-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.9rem;
}

.meta {
    margin-top: 1rem;
    color: #FFEB3B;
    font-weight: 600;
    font-size: 0.95rem;
}

.benefit-card .icon {
    font-size: 3rem;
    margin-bottom: 1.2rem;
}

/* ────────────────────────────────────────────────
   FORM & MESSAGES
───────────────────────────────────────────────── */

form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 380px;
    margin: 0 auto;
}

input, select {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    background: rgba(255,255,255,0.9);
    color: #111;
}

button {
    padding: 1.1rem;
    background: #FFEB3B;
    color: #111;
    font-size: 1.15rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: #FFD54F;
    transform: scale(1.03);
}

#msg {
    margin-top: 1.5rem;
    font-weight: 600;
    min-height: 1.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.4s;
}

#msg.success {
    background: rgba(46, 125, 50, 0.3);
    border: 1px solid rgba(46, 125, 50, 0.6);
    animation: successPop 0.6s ease;
}

#msg.error {
    background: rgba(211, 47, 47, 0.3);
    border: 1px solid rgba(211, 47, 47, 0.6);
}

/* ────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────── */

footer {
    background: rgba(0,0,0,0.4);
    padding: 3rem 5% 2rem;
    font-size: 1.05rem;
}

.copyright {
    margin-top: 1.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */

@media (max-width: 768px) {
    header h1       { font-size: 3.4rem; }
    .tagline        { font-size: 1.5rem; }
    nav ul          { gap: 1.2rem; font-size: 0.95rem; }
    .grid, .why-grid { grid-template-columns: 1fr; }
    header          { padding: 6rem 5% 4rem; }
}

@media (max-width: 480px) {
    header h1       { font-size: 2.6rem; }
    .cta-btn        { padding: 0.8rem 1.8rem; font-size: 1rem; }
}