/* 
* Main Stylesheet for domain.com
* Financial Audit Services in Spain
*/

/* -------------------------------------------
  1. CSS Reset & Variables
------------------------------------------- */
:root {
    /* Color Palette */
    --color-bg: #FAF3E0;
    --color-accent: #FF6F61;
    --color-accent-hover: #e5655a;
    --color-dark: #3E4E50;
    --color-blue: #5D9CEC;
    --color-heading: #2C2C2C;
    --color-text: #4F4F4F;
    --color-light: #FFFFFF;
    --color-yellow: #FAD02E;
    
    /* Typography */
    --font-family: 'Montserrat', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-accent), var(--color-yellow));
    --gradient-dark: linear-gradient(135deg, var(--color-dark), #2C3E50);
    --gradient-blue: linear-gradient(135deg, var(--color-blue), #4A89DC);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%; /* Ensure body doesn't exceed viewport width */
    position: relative; /* Required for proper overflow handling */
}

/* -------------------------------------------
  2. Typography
------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

/* -------------------------------------------
  3. Layout & Containers
------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container respects viewport width */
}

section {
    padding: 80px 0;
    width: 100%; /* Ensure sections respect viewport width */
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* -------------------------------------------
  4. Buttons & Form Elements
------------------------------------------- */
.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--color-light);
    padding: 12px 24px;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    color: var(--color-light);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 16px;
    transition: border-color var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.form-check input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 4px;
    cursor: pointer;
}

.form-check label {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Form layout */
.form-group {
    margin-bottom: 20px;
}

/* -------------------------------------------
  5. Header & Navigation
------------------------------------------- */
.site-header {
    background-color: var(--color-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%; /* Ensure header respects viewport width */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-text {
    color: var(--color-accent);
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 20px;
}

.nav-item a {
    color: var(--color-dark);
    font-weight: 500;
    transition: color var(--transition-fast);
    padding: 5px 0;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--color-accent);
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    cursor: pointer;
}

.menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-dark);
    margin: 5px 0;
    border-radius: 3px;
    transition: all var(--transition-medium);
}

/* Mobile menu */
@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-light);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path var(--transition-medium);
    }
    
    .menu-icon {
        display: block;
    }
    
    .menu-toggle:checked ~ .main-nav {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .main-nav .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 10px 0;
    }
}

/* -------------------------------------------
  6. Hero Section
------------------------------------------- */
.hero-section {
    background: var(--gradient-primary);
    color: var(--color-light);
    padding: 120px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    color: var(--color-light);
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeIn 1.2s ease;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeIn 1.5s ease;
}

.hero-section .btn {
    background: var(--color-light);
    color: var(--color-accent);
    animation: fadeIn 1.8s ease;
}

.hero-section .btn:hover {
    background: var(--color-light);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* -------------------------------------------
  7. Benefits Section
------------------------------------------- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 30px;
    background-color: var(--color-light);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform var(--transition-medium);
    height: 100%; /* Ensure all cards are same height */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.benefit-item:hover {
    transform: translateY(-10px);
}

.benefit-icon {
    width: 120px; /* Increased size */
    height: 120px; /* Increased size */
    margin: 0 auto 20px;
    background-color: rgba(255, 111, 97, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon img {
    max-width: 60px; /* Increased size */
    max-height: 60px; /* Increased size */
}

.benefit-item h3 {
    margin-bottom: 15px;
}

/* -------------------------------------------
  8. About Us Section
------------------------------------------- */
.about-section .section-title {
    margin-bottom: 40px; /* Space for centered title above content */
}

.about-content {
    display: flex;
    align-items: flex-start; /* Align to top instead of center */
    gap: 50px;
    margin-top: 20px; /* Add space between title and content */
}

.about-text {
    flex: 2; /* Give text more space */
    order: 1; /* Ensure text is first (left) */
}

.about-image {
    flex: 1; /* Give image less space */
    margin-top: 40px; /* Move image even lower */
    order: 2; /* Ensure image is second (right) */
}

.about-image img {
    max-width: 90%; /* Make image a bit smaller */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        margin-bottom: 30px;
        order: 1; /* Keep text first on mobile */
    }
    
    .about-image {
        order: 2; /* Keep image second on mobile */
        margin-top: 20px;
    }
    
    .about-image img {
        max-width: 100%;
    }
}

/* -------------------------------------------
  9. Services Section
------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Show three cards in a row */
    gap: 30px;
}

.service-item {
    display: flex;
    flex-direction: column; /* Stack image on top of content */
    background-color: var(--color-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%; /* Ensure all cards have same height */
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 30px;
    flex-grow: 1; /* Allow content to grow and fill space */
}

.service-content ul {
    list-style-position: inside;
    margin-top: 15px;
}

.service-content li {
    margin-bottom: 5px;
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 column on small screens */
    }
}

/* -------------------------------------------
  10. Order Form Section
------------------------------------------- */
.order-section {
    background: var(--gradient-primary);
    color: var(--color-text); /* Changed to dark text color instead of white */
}

.order-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.order-form-container .section-title {
    color: var(--color-heading);
}

.order-form .form-check label {
    color: var(--color-text);
}

/* -------------------------------------------
  11. Testimonials Section
------------------------------------------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.testimonial-content {
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content p {
    font-style: italic;
}

.testimonial-content:before {
    content: '"';
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.1;
    position: absolute;
    top: -20px;
    left: -10px;
}

.testimonial-author h4 {
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* -------------------------------------------
  12. FAQ Section
------------------------------------------- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion {
    background-color: var(--color-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-toggle {
    position: absolute;
    opacity: 0;
    z-index: -1;
}

.faq-question {
    display: block;
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background-color var(--transition-fast);
}

.faq-question:hover {
    background-color: rgba(255, 111, 97, 0.05);
}

.faq-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
}

.faq-icon:before, .faq-icon:after {
    content: '';
    position: absolute;
    background-color: var(--color-accent);
    transition: transform var(--transition-fast);
}

.faq-icon:before {
    width: 12px;
    height: 2px;
    top: 5px;
}

.faq-icon:after {
    width: 2px;
    height: 12px;
    left: 5px;
    transform-origin: center;
}

.faq-toggle:checked ~ .faq-question .faq-icon:after {
    transform: rotate(90deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height var(--transition-medium), padding var(--transition-medium);
}

.faq-toggle:checked ~ .faq-answer {
    max-height: 1000px;
    padding: 0 20px 20px;
}

/* -------------------------------------------
  13. Contact Section
------------------------------------------- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-item {
    margin-bottom: 20px;
}

.contact-item h4 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

.contact-map {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.map-container {
    height: 100%;
    min-height: 300px;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------
  14. Footer
------------------------------------------- */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-desc {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-col h4 {
    color: var(--color-light);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-address p {
    margin-bottom: 10px;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-address a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* -------------------------------------------
  15. Cookie Popup
------------------------------------------- */
.cookie-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: var(--color-light);
    padding: 15px 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: bottom var(--transition-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-popup.active {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* -------------------------------------------
  16. Legal Pages
------------------------------------------- */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.legal-content h2 {
    color: var(--color-accent);
    margin-top: 40px;
}

.legal-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-content p, .legal-content ul, .legal-content ol {
    margin-bottom: 20px;
}

.legal-content ul, .legal-content ol {
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 10px;
}

/* -------------------------------------------
  17. Thank You Page
------------------------------------------- */
.thank-you-section {
    text-align: center;
    padding: 100px 0;
}

.thank-you-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-light);
    font-size: 3rem;
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-light); /* Added background */
    border-radius: 16px; /* Added border radius */
    padding: 40px; /* Added padding */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Added shadow */
}

/* -------------------------------------------
  18. Animations
------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn var(--transition-slow);
}

.slide-up {
    animation: slideUp var(--transition-slow);
}

/* -------------------------------------------
  19. Responsive Design
------------------------------------------- */
@media (max-width: 1200px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    section { padding: 60px 0; }
}

@media (max-width: 992px) {
    .benefit-item, .testimonial-item {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    section { padding: 40px 0; }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .order-form-container {
        padding: 20px;
    }
    
    .legal-page {
        padding: 20px;
    }
} 