/* 
 * Main stylesheet for ContaEspaña
 * Color palette:
 * - Gradient background: #3C1361 to #D6C2E3
 * - Accent: #FF6B4A
 * - Headings: #F3F3F3
 * - Block background: #EAF8F9
 * - Text: #1A1C3F
 * - Buttons: #00D1B2
 */

/* ===== RESET AND BASE STYLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Prevent header overlap when scrolling to anchors */
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #1A1C3F;
    background: linear-gradient(135deg, #3C1361 0%, #D6C2E3 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: #00D1B2;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #FF6B4A;
}

ul, ol {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    color: #F3F3F3;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background-color: #FF6B4A;
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    background-color: #00D1B2;
    color: #1A1C3F;
    border: none;
    border-radius: 4px;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover, .btn:focus {
    background-color: #FF6B4A;
    color: #F3F3F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.8rem;
}

.btn-ghost {
    background-color: transparent;
    border: 2px solid #00D1B2;
    color: #00D1B2;
}

.btn-ghost:hover, .btn-ghost:focus {
    background-color: #00D1B2;
    color: #1A1C3F;
}

/* ===== HEADER ===== */
.site-header {
    background-color: rgba(26, 28, 63, 0.9);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 180px;
}

.main-nav ul {
    display: flex;
}

.main-nav li:not(:last-child) {
    margin-right: 2.5rem;
}

.main-nav a {
    color: #F3F3F3;
    font-weight: 600;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #00D1B2;
    transition: width 0.3s ease;
}

.main-nav a:hover::after, 
.main-nav a:focus::after {
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contact-info .phone, 
.contact-info .address {
    display: flex;
    align-items: center;
    color: #F3F3F3;
    font-size: 1.4rem;
}

.contact-info svg {
    margin-right: 0.5rem;
}

.contact-info .phone a {
    color: #F3F3F3;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0;
    background-color: rgba(26, 28, 63, 0.8);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/F2fXui.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
    z-index: -1;
}

.hero-content {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    margin-bottom: 2rem;
}

.hero p {
    color: #F3F3F3;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    background-color: #EAF8F9;
    padding: 8rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.about-card {
    background-color: #FFF;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card h3 {
    color: #1A1C3F;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(60, 19, 97, 0.9) 0%, rgba(214, 194, 227, 0.9) 100%);
}

.services h2 {
    color: #F3F3F3;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.service-card {
    background-color: #EAF8F9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-content {
    padding: 2.5rem;
}

.service-content h3 {
    color: #1A1C3F;
    margin-bottom: 1.5rem;
}

.service-price {
    font-size: 2.4rem;
    font-weight: 700;
    color: #00D1B2;
    margin: 2rem 0;
}

/* ===== WHY US SECTION ===== */
.why-us {
    background-color: #EAF8F9;
    padding: 8rem 0;
}

.why-us h2 {
    color: #1A1C3F;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.benefit-card {
    background-color: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 209, 178, 0.1);
    border-radius: 50%;
}

.benefit-card h3 {
    color: #1A1C3F;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(60, 19, 97, 0.9) 0%, rgba(214, 194, 227, 0.9) 100%);
}

.testimonials h2 {
    color: #F3F3F3;
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.testimonials-track {
    display: flex;
    width: 300%; /* 3 slides */
    transition: transform 0.5s ease-in-out;
    animation: testimonialSlide 15s infinite;
}

.testimonial-slide {
    width: 33.33%;
    padding: 0 2rem;
}

.testimonial-card {
    background-color: #EAF8F9;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial-card::before {
    content: "\201C";
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 6rem;
    line-height: 1;
    color: rgba(0, 209, 178, 0.2);
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-name {
    font-weight: 700;
    color: #1A1C3F;
}

.author-title {
    color: #666;
    font-size: 1.4rem;
}

/* ===== FAQ SECTION ===== */
.faq {
    background-color: #EAF8F9;
    padding: 8rem 0;
}

.faq h2 {
    color: #1A1C3F;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    background-color: white;
    padding: 2rem;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1A1C3F;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.accordion-toggle {
    font-size: 2rem;
    color: #1A1C3F;
    text-decoration: none;
}

.accordion-content {
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.accordion-body {
    padding: 0 2rem 2rem;
}

/* Accordion styling for both CSS :target and PHP control */
.accordion-item:target .accordion-content {
    max-height: 1000px;
}

/* ===== CONTACT FORM ===== */
.contact {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(60, 19, 97, 0.9) 0%, rgba(214, 194, 227, 0.9) 100%);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 5rem;
}

.form-container {
    background-color: #EAF8F9;
    padding: 4rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #d1d1d1;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1.6rem;
    color: #1A1C3F;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #00D1B2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 209, 178, 0.2);
}

.form-label {
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    color: #666;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    transform: translateY(-2.5rem);
    font-size: 1.2rem;
    color: #00D1B2;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-group input {
    margin-right: 1rem;
}

.error-message {
    color: #FF6B4A;
    font-size: 1.4rem;
    margin-top: 0.5rem;
    display: block;
}

.contact-info-card {
    background: rgba(26, 28, 63, 0.8);
    padding: 4rem;
    border-radius: 8px;
    color: #F3F3F3;
}

.contact-info-card h3 {
    margin-bottom: 3rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-info-item svg {
    margin-right: 1.5rem;
    min-width: 24px;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #1A1C3F;
    color: #F3F3F3;
    padding: 6rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-about {
    grid-column: span 2;
}

.footer-about p {
    margin-top: 2rem;
    opacity: 0.8;
}

.footer-links h3,
.footer-legal h3,
.footer-contact h3 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.footer-links h3::after,
.footer-legal h3::after,
.footer-contact h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #00D1B2;
}

.footer-links ul,
.footer-legal ul,
.footer-contact ul {
    opacity: 0.8;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 1rem;
}

.footer-contact li {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-contact svg {
    margin-right: 1rem;
    min-width: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #00D1B2;
    transform: translateY(-3px);
}

.copyright {
    opacity: 0.8;
    margin-bottom: 0;
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1A1C3F;
    color: #F3F3F3;
    padding: 1.5rem;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#accept-cookies {
    padding: 1rem 2rem;
    background-color: #00D1B2;
    color: #1A1C3F;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#accept-cookies:hover {
    background-color: #FF6B4A;
    color: #F3F3F3;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes testimonialSlide {
    0%, 30% {
        transform: translateX(0);
    }
    33.33%, 63.33% {
        transform: translateX(-33.33%);
    }
    66.66%, 96.66% {
        transform: translateX(-66.66%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1024px) {
    html {
        font-size: 58%;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 55%;
    }
    
    .site-header .container {
        flex-wrap: wrap;
    }
    
    .logo {
        width: 150px;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1.5rem;
    }
    
    .main-nav ul {
        justify-content: space-around;
    }
    
    .main-nav li:not(:last-child) {
        margin-right: 1rem;
    }
    
    .contact-info {
        align-items: flex-end;
    }
    
    .hero {
        min-height: auto;
        padding: 6rem 0;
    }
    
    .footer-about {
        grid-column: span 1;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 576px) {
    html {
        font-size: 50%;
    }
    
    h1 {
        font-size: 3.6rem;
    }
    
    h2 {
        font-size: 2.8rem;
    }
    
    .contact-container {
        gap: 3rem;
    }
    
    .form-container,
    .contact-info-card {
        padding: 2.5rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .main-nav li {
        margin-bottom: 1rem;
    }
    
    .contact-info {
        display: none;
    }
} 