/* ==========================================================================
   1. CSS Variables
   ========================================================================== */
:root {
    /* Color Palette (Complementary: Blue-Green & Red-Orange) */
    --color-bg: #E0E5EC; /* Light, slightly cool gray for neumorphism base */
    --color-primary: #0D7377; /* Teal/Blue-Green */
    --color-primary-dark: #0A595C;
    --color-accent: #E85A4F; /* Coral/Red-Orange */
    --color-accent-dark: #D1463B;
    --color-text-dark: #333745; /* Dark text for high contrast */
    --color-text-light: #FFFFFF;
    --color-white: #FFFFFF;
    --color-border: #D1D9E6;

    /* Neumorphism Shadows */
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --neumorphic-shadow: .5rem .5rem 1rem var(--shadow-dark), -.5rem -.5rem 1rem var(--shadow-light);
    --neumorphic-shadow-inset: inset .5rem .5rem 1rem var(--shadow-dark), inset -.5rem -.5rem 1rem var(--shadow-light);

    /* Typography */
    --font-family-headings: 'Manrope', sans-serif;
    --font-family-body: 'Rubik', sans-serif;

    /* Spacing & Sizing */
    --header-height: 80px;
    --border-radius: 15px;
    --container-width: 1200px;
    --container-padding: 1.5rem;
}

/* ==========================================================================
   2. Base Styles & Typography
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--color-bg);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   3. Global Components (Buttons, Cards, Forms)
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--neumorphic-shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: .7rem .7rem 1.2rem var(--shadow-dark), -.7rem -.7rem 1.2rem var(--shadow-light);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: var(--neumorphic-shadow-inset);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
    box-shadow: var(--neumorphic-shadow);
}


/* Cards */
.card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: .7rem .7rem 1.2rem var(--shadow-dark), -.7rem -.7rem 1.2rem var(--shadow-light);
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    margin-bottom: 1.5rem;
    border-radius: calc(var(--border-radius) - 5px);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.card-content {
    width: 100%;
}

/* Forms */
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--color-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow-inset);
    color: var(--color-text-dark);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: inset .3rem .3rem .6rem var(--shadow-dark), inset -.3rem -.3rem .6rem var(--shadow-light), 0 0 0 2px var(--color-primary);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #888;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -25px;
    left: 5px;
    font-size: 0.85rem;
    color: var(--color-primary);
}


/* ==========================================================================
   4. Layout (Header, Footer, Sections)
   ========================================================================== */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(224, 229, 236, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 1rem;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(163, 177, 198, 0.3);
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-family-headings);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-family-headings);
    font-weight: 700;
    color: var(--color-text-dark);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text-dark);
    transition: all 0.3s ease-in-out;
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-light {
    background-color: #d8e0e9; /* Slightly different shade for variation */
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.8rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: -2rem auto 3rem;
    font-size: 1.1rem;
    color: #555;
}

/* Footer */
.footer {
    background-color: #cdd5e0;
    padding: 4rem 0 2rem;
    color: var(--color-text-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-heading {
    font-family: var(--font-family-headings);
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-dark);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}


/* ==========================================================================
   5. Section-Specific Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--color-text-light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.stat-number {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 1rem;
    color: #555;
}

/* Timeline Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-border);
    box-shadow: var(--neumorphic-shadow-inset);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-bg);
    border: 4px solid var(--color-primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    position: relative;
    border-radius: var(--border-radius);
    text-align: left;
}

.timeline-date {
    font-family: var(--font-family-headings);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    display: block;
}

/* Innovation Slider */
.slider-container {
    position: relative;
}

.custom-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* for smooth scrolling on iOS */
    padding-bottom: 1rem;
}

.custom-slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar */
}

.slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    margin-right: 2rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--neumorphic-shadow);
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: #d1d9e6;
}

.slider-btn.prev { left: -25px; }
.slider-btn.next { right: -25px; }


/* Projects/Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* External Resources */
.resource-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.resource-list li {
    margin-bottom: 1rem;
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    padding: 1rem;
    transition: all 0.3s ease;
}
.resource-list li:hover {
    transform: scale(1.02);
    box-shadow: .7rem .7rem 1.2rem var(--shadow-dark), -.7rem -.7rem 1.2rem var(--shadow-light);
}
.resource-list a {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}

.pricing-card {
    padding: 2.5rem 2rem;
    border: 3px solid transparent;
}

.pricing-card.popular {
    transform: scale(1.05);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(163, 177, 198, 0.6);
    position: relative;
}
.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--color-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 1rem 0;
    color: var(--color-primary);
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.features-list {
    margin: 2rem 0;
}

.features-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 25px;
}

.features-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* ==========================================================================
   6. Page-Specific Styles
   ========================================================================== */
.legal-page-content, .simple-page-content {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    min-height: 80vh;
}

.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
}

.success-page h1 {
    color: var(--color-primary);
    font-size: 3rem;
}

/* ==========================================================================
   7. Media Queries (Responsiveness)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .section { padding: 4rem 0; }
    h1 { font-size: 2.5rem; }
    h2, .section-title { font-size: 2rem; }

    /* Mobile Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--color-bg);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 2rem;
        padding-top: 3rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Timeline Mobile */
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item::after { left: 21px; }

    /* Slider Mobile */
    .slide {
        flex: 0 0 calc(100% - 2rem);
        margin: 0 1rem;
    }
    .slider-btn { display: none; }
    
    .pricing-card.popular {
        transform: scale(1);
    }
}