/* ==============================
   1. CSS VARIABLES & THEME
   ============================== */
:root {
    /* Color Scheme (Tetradic) */
    --bg-color: #eef2f9; /* Light, slightly cool background */
    --bg-light-color: #fafcff; /* Lighter shade for subtle contrast */
    --primary-color: #0d6efd; /* Energetic Blue */
    --accent-color-1: #fd7e14; /* Vibrant Orange */
    --accent-color-2: #198754; /* Solid Green */
    --accent-color-3: #dc3545; /* Strong Red/Pink for alerts or specific highlights */
    
    /* Text & Headings */
    --text-color: #495057; /* Dark Grey for body text */
    --heading-color: #212529; /* Near-black for headings */
    --link-color: var(--primary-color);
    --link-hover-color: var(--accent-color-1);
    
    /* Neomorphism Shadows */
    --shadow-light: rgba(255, 255, 255, 0.8);
    --shadow-dark: rgba(180, 190, 210, 0.6);

    /* Fonts */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Lato', sans-serif;

    /* General */
    --border-radius: 15px;
    --transition-speed: 0.3s;
    --transition-easing: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

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

/* ==============================
   3. TYPOGRAPHY & UTILITIES
   ============================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3rem); text-align: center; margin-bottom: 2.5rem;}
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
    max-width: 75ch;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 6rem 0;
}

.section-light {
    background-color: var(--bg-light-color);
}

.section-title {
    color: var(--heading-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

.columns-container {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.column.is-two-thirds {
    flex: 2;
}
.column {
    flex: 1;
}

@media (max-width: 768px) {
    .columns-container {
        flex-direction: column;
    }
}


/* ==============================
   4. GLOBAL COMPONENTS
   ============================== */

/* --- Buttons --- */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-easing) var(--transition-speed);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    background-color: var(--bg-color);
    color: var(--heading-color);
}

.btn:hover, button:hover, input[type="submit"]:hover {
    color: var(--accent-color-1);
    transform: translateY(-3px);
    text-decoration: none;
}

.btn:active, button:active, input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.btn.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.2), -4px -4px 10px rgba(255,255,255,0.1);
}

.btn.btn-primary:hover {
    background-color: #0b5ed7;
    color: #fff;
}

.btn.btn-primary:active {
    box-shadow: inset 2px 2px 5px #0a58ca;
}

/* --- Cards --- */
.card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 18px 18px 36px var(--shadow-dark), -18px -18px 36px var(--shadow-light);
}

.card .card-image {
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

.card .card-title {
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

/* --- Forms --- */
.contact-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-secondary);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    transition: all var(--transition-speed) ease;
}

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

.form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -1.5rem;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
}

textarea.form-input {
    resize: vertical;
    min-height: 150px;
}

/* ==============================
   5. HEADER & NAVIGATION
   ============================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-speed) ease-in-out;
    background: transparent;
}

.header.scrolled {
    background: rgba(238, 242, 249, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--heading-color);
    text-shadow: 1px 1px 3px var(--shadow-light);
}
.header.scrolled .nav-logo,
.header.scrolled .nav-link {
    color: var(--heading-color);
}
.hero ~ .header .nav-logo,
.hero ~ .header .nav-link {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

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

.nav-link {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) var(--transition-easing);
    padding-bottom: 0.5rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) var(--transition-easing);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color-1);
    text-decoration: none;
}

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

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.header.scrolled .bar {
    background-color: var(--heading-color);
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001; /* Above the menu */
    }

    .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);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        gap: 3rem;
    }

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

    .nav-link {
        font-size: 1.5rem;
        color: var(--heading-color) !important;
        text-shadow: none;
    }
}


/* ==============================
   6. SECTION STYLES
   ============================== */

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 0 1rem;
}

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

.hero-title {
    color: #FFFFFF;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin: 1.5rem 0 2.5rem;
    color: #FFFFFF;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* --- Vision & Accordion --- */
.accordion {
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.accordion-item {
    background-color: var(--bg-color);
}

.accordion-header {
    width: 100%;
    background-color: transparent;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.2rem;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--heading-color);
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}
.accordion-header:hover {
    background-color: #e4e8f1;
}

.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.4s var(--transition-easing);
}
.accordion-header.active::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--bg-light-color);
    padding: 0 1.5rem;
}
.accordion-content p {
    margin-bottom: 0;
    padding: 1.5rem 0;
}

/* --- History & Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #ccd5e0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

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

.timeline-content {
    padding: 1.5rem 2rem;
    background-color: var(--bg-light-color);
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}
.timeline-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}
@media (max-width: 768px) {
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        left: 0 !important;
        text-align: left !important;
    }
    .timeline-dot {
        left: 10px !important;
        right: auto;
    }
}

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

/* --- Testimonials & Carousel --- */
.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    background: var(--bg-color);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}
.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.testimonial-slide {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}
.testimonial-slide.active {
    visibility: visible;
    opacity: 1;
    position: relative;
    transform: none;
    top: auto;
    left: auto;
}
.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
}
.carousel-controls {
    position: absolute;
    top: 50%;
    width: calc(100% - 40px);
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}
.carousel-controls button {
    background: none;
    box-shadow: none;
    font-size: 2rem;
    color: var(--text-color);
}
.carousel-controls button:hover {
    color: var(--primary-color);
}
.carousel-controls button:active {
    box-shadow: none;
}

/* --- Resources --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.resource-card {
    display: block;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--bg-light-color);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-card:hover {
    transform: translateY(-5px);
    text-decoration: none;
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}
.resource-card .resource-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.resource-card .resource-description {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* --- Contact --- */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}

/* ==============================
   7. FOOTER
   ============================== */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 4rem 0 2rem;
}

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

.footer-heading {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color-1);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #bdc3c7;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* ==============================
   8. SPECIFIC PAGES
   ============================== */

/* --- Page Header (About, Contact) --- */
.page-header {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.page-header .page-title {
    color: #FFFFFF;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

/* --- Content Pages (About, Contact, Legal) --- */
.content-page {
    padding-top: 100px; /* Offset for fixed header */
    padding-bottom: 4rem;
    max-width: 900px;
}
.content-page .page-title-legal {
    text-align: left;
    margin-bottom: 2rem;
}
.content-page .legal-subtitle {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.content-page ul {
    padding-left: 2rem;
}
.contact-wrapper-page {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 768px) {
    .contact-wrapper-page {
        grid-template-columns: 1fr;
    }
}
.contact-info ul {
    list-style: none;
}
.contact-info li {
    margin-bottom: 1rem;
}

/* --- Success Page --- */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); /* Adjust based on header/footer height */
}
.success-box {
    text-align: center;
    padding: 4rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}
.success-title {
    color: var(--accent-color-2);
    font-size: 4rem;
}
.success-text {
    font-size: 1.2rem;
    margin: 1rem 0 2rem;
}

/* --- AOS Animation --- */
[data-aos] {
    transition-property: transform, opacity;
}