/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

:root {
    --bg-main: #0a0b10;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --input-bg: #14151a;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* Fluid spacing scale */
    --space-xs: clamp(0.5rem, 1.5vw, 0.75rem);
    --space-sm: clamp(0.75rem, 2vw, 1rem);
    --space-md: clamp(1rem, 3vw, 1.5rem);
    --space-lg: clamp(1.5rem, 4vw, 2.5rem);
    --space-xl: clamp(2.5rem, 6vw, 5rem);
    --space-xxl: clamp(4rem, 8vw, 8rem);
}

body.light-mode {
    --bg-main: #f8f9fa;
    --bg-surface: rgba(0, 0, 0, 0.03);
    --bg-glass: rgba(0, 0, 0, 0.04);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --input-bg: #f3f4f6;
    /* optional tweaks for light mode below if necessary */
}

/* Adjust dark background gradients for light mode */
body.light-mode .hero-background .overlay {
    background: radial-gradient(ellipse at center, transparent 20%, rgba(248, 249, 250, 0.9) 80%);
}

body.light-mode .glass-box {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .btn-secondary {
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .service-card,
body.light-mode .contact-box,
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    border-color: rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

body.light-mode .hero h1 {
    color: var(--text-primary);
}

body.light-mode .hero p {
    color: var(--text-secondary);
}

body.light-mode .hero-img img {
    border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    body.light-mode .navbar {
        background: rgba(255, 255, 255, 0.97);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    body.light-mode .nav-links {
        background: #ffffff;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    }

    body.light-mode .nav-links li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 11, 16, 0.96);
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
}

.nav-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.9rem, 4vw, 1.5rem);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.1px;
    white-space: nowrap;
    text-transform: uppercase;
}

.logo-img {
    height: clamp(40px, 7vw, 70px);
    width: auto;
    object-fit: contain;
    opacity: 0.95;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo-img:hover {
    filter: drop-shadow(0 0 10px var(--primary-glow));
    opacity: 1;
}

.logo span {
    color: var(--primary);
    font-weight: 800;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 2vw, 2.5rem);
    align-items: center;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Perfectly center the links within the nav-area */
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active-link {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1100;
    margin-left: auto; /* Pushes the controls to the far right of the nav-area */
}

.theme-btn {
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
}

/* Hamburger */
.menu-toggle {
    display: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
    background: transparent;
    border: none;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Close overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1rem);
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 18px var(--primary-glow);
    border: none;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1rem);
    display: inline-block;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--text-primary);
}

/* ===== HERO ===== */
/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 1;
    text-align: left;
    max-width: 600px;
}

.hero-text h1 {
    font-size: clamp(1.8rem, 8.5vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    font-weight: 800;
    word-break: keep-all;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-img img {
    width: 100%;
    max-width: 550px;
    height: auto;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== SERVICES ===== */
.services {
    padding: var(--space-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: var(--bg-glass);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.card-image {
    height: clamp(160px, 20vw, 220px);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .card-image img {
    transform: scale(1.08);
}

.card-content {
    padding: var(--space-lg);
}

.service-icon {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 1.8vw, 0.98rem);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.learn-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.learn-more:hover {
    color: var(--accent);
    gap: 0.7rem;
}

/* ===== ABOUT ===== */
.about {
    padding: var(--space-xxl) 0;
    background: linear-gradient(180deg, transparent, rgba(79, 70, 229, 0.04) 50%, transparent);
}

.about-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.about-text {
    flex: 1;
    min-width: 0;
}

.about-text h2 {
    font-size: clamp(1.6rem, 7vw, 3rem);
    margin-bottom: var(--space-md);
    overflow-wrap: break-word;
}

.about-text>p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem var(--space-md);
}

.features li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: clamp(0.85rem, 1.8vw, 0.98rem);
    font-weight: 500;
}

.features i {
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.about-image-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
    /* bottom margin to make room for the glass-box that overflows */
    padding-bottom: 40px;
}

.about-img {
    width: 100%;
    height: clamp(280px, 40vw, 430px);
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: block;
}

.glass-box {
    position: absolute;
    bottom: -24px;
    right: -12px;
    background: rgba(10, 11, 16, 0.95);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.count-item {
    text-align: center;
}

.count-item .number {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.count-item .label {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ===== CONTACT ===== */
.contact {
    padding: var(--space-xxl) 0;
}

.contact-box {
    background: var(--bg-surface);
    border-radius: 32px;
    padding: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-info h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.contact-info>p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.details p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
}

.details i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    padding: clamp(0.9rem, 2vw, 1.2rem) clamp(1rem, 2.5vw, 1.4rem);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ===== FOOTER ===== */
.footer {
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.footer-brand p {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    max-width: 280px;
}

.footer-links h4 {
    color: #4f46e5;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large laptops / small desktops */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets landscape / small laptops (IPad Pro 12.9" Portrait) */
@media (max-width: 1024px) {
    .nav-content {
        gap: 2rem;
        /* Reduce the large gap to fit tablet screens */
    }

    .hero-flex {
        gap: 2.5rem;
    }

    .about-flex {
        gap: var(--space-lg);
    }

    .contact-box {
        grid-template-columns: 1fr;
    }
}

/* IPad Pro 11" / IPad Air Portrait (820px-840px) */
@media (max-width: 840px) {
    .nav-content {
        display: flex;
        justify-content: space-between;
    }
    
    .nav-area {
        display: flex;
        width: auto;
    }
    
    .nav-links {
        position: fixed; /* Revert to side drawer for mobile */
        left: auto;
        transform: none;
    }
    
    .nav-controls {
        margin-left: 0;
    }
    .nav-content {
        gap: 0;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-text h1 {
        font-size: clamp(1.5rem, 8.5vw, 2.2rem);
        margin-bottom: 1rem;
        word-break: normal;
        line-height: 1.25;
        letter-spacing: -0.2px;
    }

    .hero-flex {
        flex-direction: column;
        text-align: center;
        gap: 3.5rem;
    }

    .hero-text {
        text-align: center;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text h1,
    .hero-text p {
        width: 100%;
        max-width: 100%;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-img {
        justify-content: center;
    }

    .about-flex {
        display: block;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .about-flex {
        display: block;
        text-align: center;
    }

    .about-text {
        margin-bottom: 4rem;
        /* Adds the requested space between text and image */
    }

    .hero-flex {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-img {
        justify-content: center;
    }

    .features {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        justify-items: center;
        text-align: left;
        max-width: 550px;
        margin: 0 auto;
        gap: 1rem;
    }

    .about-image-wrapper {
        width: 100%;
        padding-bottom: 50px;
    }

    .about-img {
        height: clamp(250px, 45vw, 320px);
        width: 100%;
    }

    .glass-box {
        bottom: -10px;
        right: 50%;
        transform: translateX(50%);
        width: auto;
        min-width: 220px;
    }
}

/* Mobile landscape / large phones */
@media (max-width: 768px) {
    .navbar {
        background: rgba(10, 11, 16, 0.97);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-overlay {
        display: block;
        pointer-events: none;
    }

    .nav-overlay.active {
        pointer-events: all;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(220px, 65vw);
        height: 100vh;
        height: 100dvh;
        background: #0d0e14;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        padding: 5rem 2.5rem 2.5rem;
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 999;
        border-left: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a {
        font-family: 'Outfit', sans-serif;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-secondary);
        display: block;
        padding: 0.85rem 0;
    }

    .nav-links a:hover {
        color: var(--text-primary);
        padding-left: 0.5rem;
    }

    .nav-links a::after {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-image {
        height: 200px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 320px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .contact-box {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand p {
        margin: 0.75rem auto 0;
    }
}

/* Mobile portrait (small smartphones) */
@media (max-width: 480px) {
    .logo a {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 45px;
    }

    .hero {
        padding: 90px 1rem 50px;
    }

    .hero h1 {
        font-size: clamp(1rem, 8vw, 2.4rem);
    }

    .section-header h2 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .services-grid {
        gap: 1.2rem;
    }

    .features {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .about-image-wrapper {
        padding-bottom: 60px;
    }

    .about-img {
        height: min(350px, 50vw);
        object-fit: cover;
    }

    .glass-box {
        padding: 0.8rem 1.2rem;
        gap: 1.2rem;
        border-radius: 12px;
        bottom: -15px;
        min-width: 180px;
    }

    .contact-box {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        gap: 2rem;
    }

    .contact-info h2 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }

    .social-icons a {
        width: 40px;
        height: 40px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.4rem;
        letter-spacing: -0.5px;
    }

    .nav-links {
        width: 100vw;
        border-left: none;
    }

    .btn-primary,
    .btn-secondary {
        max-width: 100%;
    }
}

/* ===== CONTACT FORM VALIDATION ===== */
.contact-form .form-group {
    position: relative;
    margin-bottom: 0.2rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    display: block;
    min-height: 1rem;
    opacity: 0;
    transition: var(--transition);
    font-weight: 500;
}

.error-message.active {
    opacity: 1;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.03);
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #10b981 !important;
    background: var(--input-bg);
}

/* Fix for Autofill Background and Color */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Success Message Popup Responsive */
.form-success-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 24px;
    z-index: 2000;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    width: min(90%, 450px);
}

.form-success-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.form-success-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-primary);
}

.form-success-overlay p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    line-height: 1.5;
}

.success-icon {
    width: clamp(50px, 12vw, 64px);
    height: clamp(50px, 12vw, 64px);
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}