/*
  style.css
  Theme: Mantenimiento Técnico de Autoparques para Negocios
  Design System: Brutalism + Biomorphic
  Color Scheme: Complementary (Indigo/Purple + Orange)
*/

/* 1. CSS Variables & Root Styles */
:root {
    /* Color Palette */
    --primary-color: #4f46e5;      /* Indigo */
    --primary-dark: #3730a3;      /* Darker Indigo */
    --secondary-color: #f97316;    /* Orange */
    --secondary-dark: #ea580c;    /* Darker Orange */
    --background-light: #f8fafc; /* Light Gray */
    --background-dark: #1e293b;  /* Dark Blue-Gray */
    --text-dark: #0f172a;        /* Very Dark Blue-Gray */
    --text-light: #f1f5f9;       /* Lightest Gray */
    --border-color: #0f172a;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    /* Spacing & Borders */
    --border-width: 2px;
    --border-radius-sharp: 0;
    --brutalist-shadow: 4px 4px 0px var(--border-color);
    --brutalist-shadow-hover: 6px 6px 0px var(--border-color);
}

/* 2. Global Styles & Typography */
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.7;
}

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

.display-5 {
    font-weight: 700 !important;
}

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

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

.bg-dark {
    background-color: var(--background-dark) !important;
}

/* 3. Reusable Components & Utility Classes */

/* Global Button Styles */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.8rem 1.8rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius-sharp);
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    box-shadow: var(--brutalist-shadow);
}

.btn:hover,
.btn:focus {
    box-shadow: var(--brutalist-shadow-hover);
    transform: translate(-2px, -2px);
}

/* Primary Button Style */
.btn-primary.custom-btn, .btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--border-color);
}

.btn-primary.custom-btn:hover, .btn-primary:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

/* Outline Button Style */
.btn-outline-primary.custom-btn-outline, .btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none; /* Outline buttons often look better without the shadow */
}

.btn-outline-primary.custom-btn-outline:hover, .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--border-color);
    box-shadow: var(--brutalist-shadow); /* Add shadow on hover for effect */
    transform: translate(0,0);
}

/* Forms */
.form-control.custom-input {
    border-radius: var(--border-radius-sharp);
    border: var(--border-width) solid #ced4da;
    padding: 0.8rem 1rem;
    transition: all 0.2s ease-in-out;
}

.form-control.custom-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-dark);
}

/* Brutalist Elements */
.brutalist-border-bottom {
    border-bottom: var(--border-width) solid var(--border-color);
}
.brutalist-border-top {
    border-top: var(--border-width) solid var(--border-color);
}

.card.brutalist-card {
    background-color: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius-sharp);
    box-shadow: var(--brutalist-shadow);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center; /* Center flex items */
}

.card.brutalist-card:hover {
    box-shadow: var(--brutalist-shadow-hover);
    transform: translate(-2px, -2px);
}

.card.brutalist-card .card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
    border-bottom: var(--border-width) solid var(--border-color);
}

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

.card.brutalist-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    width: 100%;
}

.brutalist-list-item {
    border: var(--border-width) solid #dee2e6;
    border-radius: var(--border-radius-sharp);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.brutalist-list-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

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


/* 4. Section Specific Styles */

/* Header */
.navbar {
    transition: background-color 0.3s ease;
}
.navbar-brand {
    font-size: 1.75rem;
    font-weight: 900;
}
.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0.5rem;
    transition: color 0.2s;
}
.nav-link:hover {
    color: var(--primary-color) !important;
}


/* Hero Section */
#hero {
    min-height: 90vh;
}
#hero h1 {
    color: #FFFFFF !important; /* VITAL requirement */
}
#hero p {
    color: #FFFFFF !important; /* VITAL requirement */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary-color);
    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;
    background-color: white;
    position: relative;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--brutalist-shadow);
}

/* Events (Stats) Section */
#events h2, #events .lead {
    color: var(--text-light);
}
.stat-widget h3 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--secondary-color);
}

/* Partners Section */
.partner-logo {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}
.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Contact Section */
.biomorphic-shape {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.biomorphic-shape p, .biomorphic-shape h3 {
    color: var(--text-light);
}
.biomorphic-shape a {
    color: var(--text-light) !important;
    text-decoration: underline;
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Footer */
footer {
    background-color: var(--background-dark);
}
footer h6 {
    color: var(--secondary-color);
}
footer a.text-reset {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
footer a.text-reset:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline;
}

/* 5. Specific Page Styles */

/* Success Page */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--background-light);
}

.success-page-container .success-box {
    max-width: 600px;
    padding: 3rem;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--brutalist-shadow);
    background-color: #fff;
}

/* Legal Pages (Privacy & Terms) */
.legal-page-content {
    padding-top: 120px; /* Offset for sticky header */
    padding-bottom: 5rem;
}
.legal-page-content h1 {
    margin-bottom: 2rem;
}
.legal-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}


/* 6. Media Queries for Responsiveness */

/* Tablets and below */
@media (max-width: 991.98px) {
    .parallax-bg {
        background-attachment: scroll; /* Disables parallax on mobile for performance */
    }
}

/* Mobile phones */
@media (max-width: 767.98px) {
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .display-3 { font-size: 2.5rem; }
    .display-5 { font-size: 2rem; }

    /* Timeline adjustments for mobile */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item::after {
        left: 21px;
    }

    .contact-form {
        margin-bottom: 2rem;
    }
}