/*
* File: style.css
* Description: Custom styles for FinanArg - Financial Consulting Website.
* Design System: Brutalism with Adaptive Typography
* Author: AI Assistant
*/

/* ==========================================================================
   1. CSS Variables & Root Configuration
   ========================================================================== */

:root {
    /* Color Palette */
    --brand-yellow: #FDE047;
    --brand-blue: #2563EB;
    --brand-dark: #111827;
    --brand-light: #F9FAFB;
    --brand-white: #FFFFFF;
    --brand-gray: #6B7280;
    --brand-red-error: #EF4444;

    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Work Sans', sans-serif;

    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-smooth: all 0.3s ease-in-out;
}

/* ==========================================================================
   2. Base & Global Styles
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--brand-light);
    color: var(--brand-dark);
    font-family: var(--font-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. Adaptive Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 900;
    line-height: 1.2;
    color: var(--brand-dark);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ==========================================================================
   4. Global UI Components (Buttons & Forms)
   ========================================================================== */

/* Global Button Styles */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border: 3px solid var(--brand-dark);
    transition: var(--transition-fast);
    box-shadow: 6px 6px 0 var(--brand-dark);
}

.btn:hover, button:hover, input[type="submit"]:hover {
    box-shadow: none;
    transform: translate(4px, 4px);
}

.btn:active, button:active, input[type="submit"]:active {
    transform: translate(6px, 6px);
}

/* Global Form Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    background-color: var(--brand-white);
    border: 3px solid var(--brand-dark);
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}


/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */
#mobile-menu {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Style for when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   6. Section Specific Styles
   ========================================================================== */

/* Hero Section */
#hero .parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#hero h1 {
    color: var(--brand-white);
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
}

#hero p {
    color: var(--brand-white);
}

/* History Section - Timeline */
.right-timeline {
    animation: 1s ease-in-out 0s 1 slideInFromLeft;
}

.left-timeline {
    animation: 1s ease-in-out 0s 1 slideInFromRight;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Card Styles (Features, Blog, etc.) */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 12px 12px 0px var(--brand-dark) !important;
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
}

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

.card-content {
    width: 100%;
}

/* Blog "Read More" link */
.card-content a {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.card-content a:hover {
    transform: translateX(5px);
    text-decoration: underline;
}

/* Gallery Section */
#gallery img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

#gallery img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* FAQ Section - Accordion */
.faq-item {
    transition: var(--transition-smooth);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust as needed */
}

.faq-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}


/* ==========================================================================
   7. Page Specific Styles
   ========================================================================== */

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Legal Pages (Privacy & Terms) */
.legal-page-content {
    padding-top: 120px;
    padding-bottom: 80px;
}

.legal-page-content h1 {
    margin-bottom: 2rem;
}

.legal-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

footer a {
    transition: color 0.2s ease-in-out;
}
/* Social links are text, so they inherit the hover state */


/* ==========================================================================
   9. Utility Classes
   ========================================================================== */

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* ==========================================================================
   10. Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    /* Center timeline items on mobile */
    #history .timeline-item {
        width: 100%;
        padding-left: 20px; /* Add some padding to not stick to the line */
    }
    
    #history .left-timeline > div:first-of-type,
    #history .right-timeline > div:first-of-type {
        display: none; /* Hide the empty spacer div */
    }

    #history .left-timeline > div.order-1,
    #history .right-timeline > div.order-1 {
        width: calc(100% - 4rem); /* Adjust width to fit */
    }
    
    #history .border {
        left: 20px !important;
    }
    
    #history .z-20 {
        left: 4px !important;
    }
    
    #history .right-timeline,
    #history .left-timeline {
        justify-content: flex-start;
        padding-left: 30px;
        flex-direction: row !important;
    }
}