/*
  Theme: Estándares de servicio y seguridad en modernos talleres de automóviles
  Design System: Corporativo
  Trend: Asymmetrical Balance
  Color Scheme: Gradient
  Animation Style: Smooth Transitions
*/

/* -------------------------------------------------------------------------- */
/*                               CSS Variables                                */
/* -------------------------------------------------------------------------- */

:root {
    /* Colors */
    --primary-dark: #1e3a8a;
    --primary-main: #3b82f6;
    --primary-light: #93c5fd;
    --secondary-color: #111827; /* Dark Gray for text */
    --accent-color: #10b981; /* A contrasting accent, e.g., for success states */

    /* Text */
    --text-dark: #222222;
    --text-light: #f8f9fa;
    --text-muted: #6b7280;

    /* Backgrounds */
    --bg-light: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-dark: #1f2937;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-main) 100%);
    --gradient-overlay: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));

    /* Fonts */
    --font-header: 'Roboto', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.3s ease-in-out;
}

/* -------------------------------------------------------------------------- */
/*                                Global Styles                               */
/* -------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-muted);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px; /* Offset for fixed header */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    color: var(--text-dark);
    font-weight: 700;
}

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

a {
    transition: var(--transition-medium);
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* -------------------------------------------------------------------------- */
/*                             Keyframe Animations                            */
/* -------------------------------------------------------------------------- */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* -------------------------------------------------------------------------- */
/*                             Reusable Components                            */
/* -------------------------------------------------------------------------- */

/* Global Button Styles */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-header);
    font-weight: 700;
    text-align: center;
    border-radius: 9999px; /* pill shape */
    cursor: pointer;
    transition: var(--transition-medium);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

button[type="submit"], .btn-primary {
    background: var(--primary-main);
    color: var(--text-light);
}

button[type="submit"]:hover, .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 20px rgba(59, 130, 246, 0.4);
}

/* Card Styles */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition-medium);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

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

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

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to take up remaining space */
}

/* Read More Link */
.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--primary-main);
    text-decoration: none;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-main);
    transition: var(--transition-medium);
}

.read-more:hover::after {
    width: 100%;
}


/* -------------------------------------------------------------------------- */
/*                               Section Styles                               */
/* -------------------------------------------------------------------------- */

/* Header */
#header {
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Hero Section */
#hero {
    color: var(--text-light);
    background-size: cover;
    background-repeat: no-repeat;
}

#hero h1 {
    color: var(--text-light);
}

/* Statistics Section */
#statistics {
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}

#statistics .stat-number {
    font-size: 4rem;
    font-weight: 900;
}

/* Parallax Background */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.parallax-bg > .absolute { /* Dark overlay for parallax sections */
    background: var(--gradient-overlay);
}

/* Contact Form */
#contact-form input,
#contact-form textarea,
#contact-form select {
    border: 2px solid #e5e7eb;
    background-color: #f9fafb;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition-fast);
    width: 100%;
}

#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
    outline: none;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
    color: rgba(255, 255, 255, 0.85);
}

footer h3 {
    color: var(--text-light);
}

footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

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

/* -------------------------------------------------------------------------- */
/*                              Page Specific Styles                          */
/* -------------------------------------------------------------------------- */

/* Styles for success.html page */
.success-page-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background: var(--gradient-main);
}

.success-page-container .success-box {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
}

/* Styles for privacy.html and terms.html pages */
.legal-page-container,
.about-page-container,
.contact-page-container {
    padding-top: 50px; /* Additional padding to ensure header doesn't overlap content */
    padding-bottom: 50px;
}

.legal-page-container h1,
.about-page-container h1,
.contact-page-container h1 {
    margin-bottom: 2rem;
}

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

.legal-page-container p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* -------------------------------------------------------------------------- */
/*                             Responsive Adjustments                         */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    body {
        padding-top: 68px; /* Adjust for smaller header height */
    }

    .section-title {
        font-size: 2.25rem; /* 36px */
    }

    #hero h1 {
        font-size: 3rem; /* 48px */
    }

    #statistics .stat-number {
        font-size: 2.5rem; /* 40px */
    }
}