/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Animation Variables */
    --transition-slow: 0.5s ease;
    --transition-medium: 0.3s ease;
    --transition-fast: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-medium);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color var(--transition-medium), transform var(--transition-fast), box-shadow var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
    z-index: -1;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

section {
    padding: 80px 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--secondary-color);
}

/* Header Styles */
header {
    /* Subtle glassy header */
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    isolation: isolate; /* ensure the decorative line sits behind content */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

/* Decorative gradient accent line at the bottom of the header */
header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #8e54e9, #2ecc71, #e67e22, var(--primary-color));
    background-size: 300% 100%;
    opacity: 0.85;
    animation: headerAccentShift 12s linear infinite;
}

/* Smooth shrinking transitions */
header .container,
.logo h1,
nav ul li {
    transition: padding 200ms ease, margin 200ms ease, gap 200ms ease, font-size 200ms ease;
}

/* Shrunk header when user scrolls */
header.header--shrink .container {
    padding: 8px 14px;
    gap: 8px;
}

header.header--shrink .logo h1 {
    font-size: 1.3rem;
}

header.header--shrink .tagline {
    display: none; /* hide tagline only when header is shrunk (on scroll) */
}

header.header--shrink nav ul li {
    margin: 2px 6px;
}

/* Reduce the space the header occupies while scrolling by compressing padding and font sizes on smaller viewports */
@media (max-width: 768px) {
    header .container {
        padding: 10px 16px;
        gap: 10px;
    }
    .logo h1 { font-size: 1.4rem; }
    /* Keep tagline visible on tablets when not scrolled */
    .tagline { display: block; }
    nav ul li { margin: 4px 8px; }
}

@keyframes headerAccentShift {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 3px; /* tighter gap so underline sits closer to H1 */
}

/* Animated underline for the OVERRIDER logo */
.logo h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px; /* slimmer line for a neat, close underline */
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), #2ecc71, #e67e22);
    background-size: 300% 100%;
    transform: scaleX(0);
    transform-origin: left center;
    animation: logoUnderlineGrow 600ms ease-out forwards, logoUnderlineHue 6s linear infinite 600ms;
}

@keyframes logoUnderlineGrow {
    to { transform: scaleX(1); }
}

@keyframes logoUnderlineHue {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .logo h1::after { animation: none; transform: scaleX(1); }
}

/* Ensure underline is visible on small viewports as well */
@media (max-width: 640px) {
    .logo h1::after {
        transform: scaleX(1);
    }
}

.tagline {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
    opacity: 0.85;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color var(--transition-medium), background-color var(--transition-medium), transform var(--transition-fast);
}

nav ul li a:after {
    /* Replaced underline with pill hover/active, keep pseudo hidden */
    content: none;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.12);
    transform: translateY(-1px);
}

nav ul li a:hover:after,
nav ul li a.active:after {
    /* no-op, underline removed */
}

nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.18);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 120px 0;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Features Section */
.features {
    background-color: white;
}

/* Technology Stack Section */
.tech-stack {
    background-color: var(--light-color);
    padding: 80px 0;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.stack-category {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.stack-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.stack-category i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.stack-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.stack-category ul {
    list-style: none;
}

.stack-category ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.stack-category ul li:before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), background-color var(--transition-slow);
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0) 50%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 0;
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid var(--primary-color);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card i {
    transition: transform var(--transition-medium), color var(--transition-medium);
}

.feature-card:hover i {
    transform: scale(1.1);
    color: var(--accent-color);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* CTA Section */
.cta {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--light-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-icons a {
    color: white;
    margin-left: 15px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* About Page Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 80px 0;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.about-intro {
    background-color: white;
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h2 {
    text-align: left;
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive layout for About Intro */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-content h2 {
        text-align: center;
    }

    .about-image {
        text-align: center;
    }

    .about-image img {
        max-width: 100%;
        height: auto;
        max-height: 420px;
    }
}

@media (max-width: 640px) {
    .about-intro {
        padding: 56px 0;
    }

    .about-grid {
        gap: 20px;
    }

    .about-content p {
        font-size: 0.95rem;
    }
}

.mission-vision {
    background-color: var(--light-color);
    padding: 80px 0;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mission-box, .vision-box, .values-box {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.mission-box i, .vision-box i, .values-box i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mission-box h3, .vision-box h3, .values-box h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.values-box ul {
    text-align: left;
    margin-top: 20px;
}

.values-box ul li {
    margin-bottom: 10px;
}

.team {
    background-color: white;
    padding: 80px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {

    background-color: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.team-member:hover {
    transform: translateY(-10px);
}

.team-member img {
    width: 100%;
    height: auto;
    max-width: 300px;
    max-height: 300px;
    object-fit: cover;
    border-radius: 5px;
}

.team-member h3 {
    font-size: 1.5rem;
    margin: 20px 0 5px;
    padding: 0 20px;
    color: var(--secondary-color);
}

.team-member .position {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    padding: 0 20px;
}

.team-member p {
    padding: 0 20px 20px;
    max-width: 600px; /* keep copy readable without forcing overflow */
    width: 100%;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 20px;
}

.social-links a {
    margin: 0 10px;
    color: var(--secondary-color);
    font-size: 1.2rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Responsive improvements for Team section */
@media (max-width: 1024px) {
    .team {
        padding: 64px 0;
    }

    .team-grid {
        gap: 28px;
    }

    .team-member h3 {
        font-size: 1.35rem;
    }
}

@media (max-width: 640px) {
    .team {
        padding: 56px 0;
    }

    .team-grid {
        grid-template-columns: 1fr; /* ensure single column on small phones */
        gap: 20px;
    }

    .team-member img {
        max-width: 260px;
        max-height: 260px;
    }

    .social-links {
        gap: 10px;
    }

    .social-links a {
        font-size: 1.15rem;
        padding: 8px 10px; /* larger tap target */
    }
}

/* Dark mode: ensure buttons/links inside team remain readable */
.dark-mode .team .social-links a {
    color: #e2e8f0; /* high-contrast text/icon color on dark surfaces */
}

.dark-mode .team .social-links a:hover {
    color: var(--primary-color);
}

/* If any .btn appears inside .team, enforce legible text and focus */
.team .btn {
    color: #ffffff;
}

.dark-mode .team .btn {
    color: #ffffff;
}

/* Focus visibility for keyboard users */
.team .btn:focus-visible,
.team .social-links a:focus-visible {
    outline: 2px solid rgba(77, 171, 247, 0.85);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}

/* Office Section */
.office {
    background-color: var(--light-color);
    padding: 80px 0;
    text-align: center;
}

.office-image {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.office-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.office-image:hover img {
    transform: scale(1.02);
}

.achievements {
    background-color: var(--light-color);
    padding: 80px 0;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.achievement-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-10px);
}

.achievement-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.achievement-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Products Page Styles */
.products-intro {
    background-color: white;
    text-align: center;
    padding: 60px 0;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.product-showcase {
    background-color: var(--light-color);
    padding: 80px 0;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 80px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-card:last-child {
    margin-bottom: 0;
}

.product-card.reverse {
    direction: rtl;
}

.product-card.reverse .product-details {
    direction: ltr;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 40px;
}

.product-details h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-tagline {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 30px;
}

.product-features {
    margin-bottom: 30px;
}

.product-features h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.product-features ul li {
    margin-bottom: 10px;
}

.product-features ul li i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Responsive layout for Product Showcase */
@media (max-width: 1024px) {
    .product-showcase {
        padding: 60px 0;
    }

    .product-card {
        grid-template-columns: 1fr;
        gap: 0; /* remove large gap when stacked */
        margin-bottom: 56px;
    }

    /* Ensure normal reading direction when stacked */
    .product-card.reverse {
        direction: ltr;
    }

    .product-image {
        max-height: 420px;
        overflow: hidden;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .product-details {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .products-intro {
        padding: 48px 0;
    }

    .product-card {
        margin-bottom: 44px;
    }

    .product-details {
        padding: 22px;
    }

    .product-details h3 {
        font-size: 1.6rem;
    }

    .product-tagline {
        font-size: 1rem;
    }

    .product-features h4 {
        font-size: 1.05rem;
    }
}

.services {
    background-color: white;
    padding: 80px 0;
    text-align: center;
}

.services-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.services-cta {
    margin-top: 40px;
}

.services-cta p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.pricing {
    background-color: var(--light-color);
    padding: 80px 0;
    text-align: center;
}

.pricing-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.pricing-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 30px;
}

.pricing-card.featured .pricing-header {
    background-color: var(--primary-color);
}

.pricing-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
}

.price span {
    font-size: 1rem;
    font-weight: normal;
}

.pricing-features {
    padding: 30px;
}

.pricing-features ul li {
    margin-bottom: 15px;
    text-align: left;
}

.pricing-features ul li i {
    margin-right: 10px;
}

.pricing-features ul li i.fa-check {
    color: #27ae60;
}

.pricing-features ul li i.fa-times {
    color: #e74c3c;
}

.pricing-card .btn {
    margin: 0 30px 30px;
}

.custom-pricing {
    margin-top: 30px;
    font-size: 1.1rem;
}

.testimonials {
    background-color: white;
    padding: 80px 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-content {
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content p {
    font-style: italic;
}

.testimonial-content:before {
    content: '\201C';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: -10px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.author-info p {
    font-size: 0.9rem;
    color: #666;
}

/* Contact Page Styles */
.contact-info {
    background-color: white;
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-details h2, .contact-form-container h2 {
    text-align: left;
    margin-bottom: 20px;
}

.contact-details > p {
    margin-bottom: 30px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
}

.contact-method i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-method h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.contact-method p {
    margin-bottom: 5px;
}

.social-connect {
    margin-top: 30px;
}

.social-connect h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.social-icons-large {
    display: flex;
    gap: 20px;
}

.social-icons-large a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--light-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icons-large a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.contact-form-container {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Responsive layout for Contact Page */
@media (max-width: 1024px) {
    .contact-info {
        padding: 60px 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-details h2,
    .contact-form-container h2 {
        text-align: center;
    }

    .contact-details > p {
        text-align: center;
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-methods {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 24px;
    }

    .contact-form-container {
        padding: 28px;
    }

    .social-icons-large {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .contact-info {
        padding: 56px 0;
    }

    .contact-grid {
        gap: 20px;
    }

    .contact-details h2,
    .contact-form-container h2 {
        font-size: 1.8rem;
    }

    .contact-method i {
        font-size: 1.5rem;
        margin-right: 12px;
    }

    .contact-method h3 {
        font-size: 1.15rem;
    }

    .social-icons-large {
        gap: 12px;
    }

    .social-icons-large a {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .contact-form-container {
        padding: 22px;
    }

    .contact-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .contact-form .btn {
        width: 100%;
        text-align: center;
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

.btn-full {
    width: 100%;
}

.map-section {
    background-color: var(--light-color);
    padding: 80px 0;
}

.map-container {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.map-placeholder {
    width: 100%;
    height: auto;
    display: block;
}

.faq-section {
    background-color: white;
    padding: 80px 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.faq-item {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.faq-item p {
    color: #555;
}

/* Form Validation Styles */
.error-message {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 5px;
    animation: fadeIn 0.3s ease;
}

.input-error {
    border: 1px solid var(--accent-color) !important;
    background-color: rgba(231, 76, 60, 0.05);
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.success-message i {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

.success-message h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    max-width: 1200px;
    margin: 0 auto;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-content p {
    flex: 1;
    min-width: 200px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-decline {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-weight: bold;
    padding: 10px 15px;
    transition: color var(--transition-medium);
}

.cookie-decline:hover {
    color: var(--accent-color);
}

.cookie-hidden {
    transform: translateY(100px);
    opacity: 0;
}

/* Dark Mode Styles */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: background-color var(--transition-medium), transform var(--transition-fast);
}

.dark-mode-toggle:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
}

.dark-mode {
    --primary-color: #4dabf7;
    --secondary-color: #1a1a2e;
    --accent-color: #ff6b6b;
    --light-color: #2d3748;
    --dark-color: #1a202c;
    --text-color: #e2e8f0;
    background-color: #121212;
    color: var(--text-color);
}

.dark-mode header,
.dark-mode footer,
.dark-mode .feature-card,
.dark-mode .about-intro,
.dark-mode .team,
.dark-mode .products-intro,
.dark-mode .services,
.dark-mode .testimonials,
.dark-mode .contact-info,
.dark-mode .faq-item {
    background-color: #1a1a2e;
}

/* Dark mode tuned header (match glass style) */
.dark-mode header {
    background-color: rgba(26, 26, 46, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Dark mode nav: switch from pill backgrounds to underline indicator */
.dark-mode nav ul li a:hover,
.dark-mode nav ul li a.active {
    background-color: transparent !important;
    color: var(--primary-color);
}

.dark-mode .mission-vision,
.dark-mode .achievements,
.dark-mode .product-showcase,
.dark-mode .pricing,
.dark-mode .map-section {
    background-color: #121212;
}

.dark-mode .feature-card,
.dark-mode .mission-box, 
.dark-mode .vision-box, 
.dark-mode .values-box,
.dark-mode .team-member,
.dark-mode .achievement-card,
.dark-mode .product-card,
.dark-mode .service-card,
.dark-mode .pricing-card,
.dark-mode .testimonial-card,
.dark-mode .faq-item {
    background-color: #2d3748;
}

.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4, 
.dark-mode h5, 
.dark-mode h6 {
    color: #e2e8f0;
}

/* Ensure general copy has sufficient contrast in dark mode */
.dark-mode p,
.dark-mode li,
.dark-mode span,
.dark-mode small,
.dark-mode label {
    color: #cfd8e3;
}

/* Override hard-coded light-mode grays inside components */
.dark-mode .author-info p,
.dark-mode .faq-item p,
.dark-mode .product-description,
.dark-mode .intro-text,
.dark-mode .contact-details > p,
.dark-mode .footer-section p {
    color: #cfd8e3;
}

/* Muted helper for secondary text in dark mode */
.dark-mode .text-muted,
.dark-mode .tagline,
.dark-mode .product-features ul li,
.dark-mode .contact-method p {
    color: #a8b3c7;
}

.dark-mode a {
    color: var(--primary-color);
}
/* ===================== */
/* Nav underline styling  */
/* ===================== */

/* Replace pill hover/active effect with an underline indicator */
nav ul li a {
    position: relative;
    display: inline-block;
    padding: 8px 0; /* vertical rhythm without adding background pills */
    transition: color var(--transition-medium), transform var(--transition-fast);
    border-radius: 0; /* neutralize any pill radius from previous styles */
    background: transparent; /* ensure no fill */
}

/* Smooth underline bar */
nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px; /* close to the text baseline */
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #8e54e9, var(--primary-color));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-medium);
    pointer-events: none;
}

/* Reveal underline on hover, focus, or when active */
nav ul li a:hover::after,
nav ul li a:focus-visible::after,
nav ul li a.active::after {
    transform: scaleX(1);
}

/* Active link color emphasis */
nav ul li a.active {
    color: var(--primary-color);
    background: transparent !important;
}

/* Remove any legacy pill hover styles */
nav ul li a:hover {
    background: transparent !important;
}

/* Dark mode keeps the same underline behavior; ensure contrast */
.dark-mode nav ul li a::after {
    background: linear-gradient(90deg, var(--primary-color), #9bd1ff, var(--primary-color));
}

/* Keyboard accessibility */
nav ul li a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 35%, transparent);
    border-radius: 4px; /* subtle focus halo without pills */
}

.dark-mode a:hover {
    color: var(--accent-color);
}

.dark-mode .btn {
    background-color: var(--primary-color);
    color: #ffffff; /* ensure button text is visible in dark mode */
}

.dark-mode .btn:hover {
    background-color: #3a8bd5;
    color: #ffffff; /* keep text readable on hover */
}

/* Inherit white text for visited/active states so anchors styled as buttons don't disappear */
.btn:visited { color: #ffffff; }
.dark-mode .btn:visited { color: #ffffff; }
.dark-mode .btn:active { color: #ffffff; }

/* Cookie banner accept button should also keep white text in dark mode */
.dark-mode .cookie-consent .btn.cookie-accept { color: #ffffff; }

.dark-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* Placeholder and focus states for form controls in dark mode */
.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #94a3b8;
}

.dark-mode input:focus,
.dark-mode select:focus,
.dark-mode textarea:focus {
    outline: 2px solid rgba(77, 171, 247, 0.55);
    outline-offset: 0;
    border-color: #4dabf7;
}

.dark-mode .cookie-consent {
    background-color: #2d3748;
    color: #e2e8f0;
}

.dark-mode .cookie-consent a {
    color: #9bd1ff;
}

.dark-mode .cookie-consent .cookie-decline {
    color: #cfd8e3;
}

.dark-mode .cookie-consent .cookie-decline:hover {
    color: var(--accent-color);
}

.dark-mode .cookie-consent .btn.cookie-accept {
    background-color: var(--primary-color);
}

/* Footer minor text contrast */
.dark-mode .footer-bottom p {
    color: #cfd8e3;
}

/* Ensure nav link base color remains readable in dark */
.dark-mode nav ul li a {
    color: #e2e8f0;
}

/* Cards content text contrast */
.dark-mode .feature-card p,
.dark-mode .service-card p,
.dark-mode .pricing-card p,
.dark-mode .testimonial-card p,
.dark-mode .product-card p {
    color: #cfd8e3;
}

/* FAQ headings already covered; ensure answers have contrast */
.dark-mode .faq-item p {
    color: #cfd8e3;
}

/* Hero and page header text on gradients stay bright */
.dark-mode .hero h2,
.dark-mode .hero p,
.dark-mode .page-header h1,
.dark-mode .page-header p {
    color: #f5f7fb;
}

/* Ensure the Features section heading stays visible in dark mode */
.dark-mode .features h2 {
    color: #f8fbff; /* slightly brighter for stronger contrast */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); /* subtle glow for readability */
    border-bottom: 2px solid rgba(155, 209, 255, 0.35); /* accent underline */
    display: inline-block; /* so underline hugs the text width */
    padding-bottom: 6px;
    letter-spacing: 0.3px;
}

/* ===================== */
/* Tech Stack - Dark Mode */
/* ===================== */
.dark-mode .features {
    /* Match other dark sections to ensure consistent contrast against dark cards */
    background-color: #121212;
}

.dark-mode .tech-stack {
    background-color: #121212; /* match other dark sections */
}

.dark-mode .stack-category {
    background-color: #2d3748; /* dark card surface */
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
}

.dark-mode .stack-category:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.dark-mode .stack-category h3 {
    color: #e2e8f0;
}

.dark-mode .stack-category ul li {
    color: #cfd8e3;
}

.dark-mode .stack-category ul li:before {
    color: #9bd1ff; /* brighter bullet for visibility */
}

.dark-mode .stack-category i {
    color: #9bd1ff; /* readable icon color in dark */
}

/* ================ */
/* Footer - Dark Mode */
/* ================ */
.dark-mode footer {
    background-color: #1a1a2e; /* already set by group rule; restate for clarity */
}

.dark-mode .footer-section h3 {
    color: #9bd1ff;
}

.dark-mode .footer-section p {
    color: #cfd8e3; /* ensured above but keep local context */
}

.dark-mode .footer-section ul li a {
    color: #cfd8e3;
}

.dark-mode .footer-section ul li a:hover {
    color: #9bd1ff;
}

.dark-mode .footer-section i {
    color: #9bd1ff;
}

.dark-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .social-icons a {
    color: #e2e8f0;
}

.dark-mode .social-icons a:hover {
    color: var(--primary-color);
}

/* Focus visibility for keyboard users in dark footer */
.dark-mode .footer-section a:focus-visible,
.dark-mode .social-icons a:focus-visible {
    outline: 2px solid rgba(77, 171, 247, 0.65);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        margin-top: 10px;
        gap: 4px;
        flex-wrap: nowrap;
    }

    nav ul li {
        margin: 0 3px;
    }

    /* Keep tagline visible when not scrolled */
    header:not(.header--shrink) .tagline { display: block; }

    .hero {
        padding: 67px 0;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .social-icons {
        margin-top: 20px;
    }

    .social-icons a {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    /* Compact, beautiful header on small phones */
    header .container {
        padding: 10px 2px; /* reduce vertical space */
        gap: 10px; /* tighter spacing between logo and nav */
    }

    .logo h1 {
        font-size: 1.4rem; /* smaller logo title */
    }

    /* Ensure tagline is visible on phones when not scrolled */
    header:not(.header--shrink) .tagline { display: block; }

    /* On scroll, shrink the phone header to ~75% reduction (keep ~25% of size) */
    header.header--shrink .container {
        padding: 2.5px 14px; /* 75% less than 10px vertical padding */
        gap: 2.5px; /* 75% less than 10px */
    }

    header.header--shrink .logo h1 {
        font-size: 0.35rem; /* ~25% of 1.4rem */
    }

    header.header--shrink nav ul li {
        margin: 1px 2px; /* ~75% tighter than 4px 8px */
    }

    nav ul {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    nav ul li {
        margin: 4px 4px; /* slightly tighter nav spacing */
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }
}
