/* 
 * AuditStabil GmbH - Styles
 * Theme: Financial Audit
 * Colors:
 * Primary: #3D348B (ultramarine)
 * Secondary: #FF6B35 (coral orange)
 * Tertiary: #E4D9FF (soft lavender-gray)
 * Background: #FFFDF9 (cream white)
 * Text: #1F1F1F (charcoal gray)
 */

/* ========== Base Styles ========== */
:root {
    --primary: #3D348B;
    --primary-dark: #322b73;
    --primary-light: #5247ad;
    --secondary: #FF6B35;
    --secondary-dark: #e25a28;
    --tertiary: #E4D9FF;
    --background: #FFFDF9;
    --text: #1F1F1F;
    --text-light: #4F4F4F;
    --text-lighter: #7F7F7F;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Add padding to scroll to prevent headers touching navigation */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%; /* Ensure HTML takes full width */
    position: relative; /* Create positioning context */
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%; /* Ensure body takes full width */
    max-width: 100vw; /* Limit width to viewport width */
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden; /* Prevent container overflow */
}

section {
    padding: 80px 0;
}

/* Add padding-top to sections with IDs for better spacing when navigating with anchor links */
section[id] {
    padding-top: 100px;
    margin-top: -20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--primary);
}

h1 {
    font-size: 42px;
}

h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style-position: inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

address {
    font-style: normal;
    margin-bottom: 20px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    color: var(--white);
}

.btn-primary-nav {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: var(--radius);
}

.btn-primary-nav:hover {
    background-color: var(--primary-dark);
    color: var(--white) !important;
}

/* ========== Header ========== */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    text-align: center; /* Added text alignment for logo */
}

.logo a {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center; /* Added text alignment for nav menu items */
}

.nav-menu li {
    margin-left: 30px;
    text-align: center; /* Added text alignment for individual nav items */
}

.nav-menu a {
    font-weight: 600;
    padding: 8px 0;
    position: relative;
}

.nav-menu a:not(.btn-primary-nav)::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ========== Hero Section ========== */
.hero {
    padding: 100px 0;
    background-color: var(--tertiary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-color: var(--secondary);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(150px, -150px);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    margin-bottom: 20px;
    color: var(--primary);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--text);
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero-image {
    flex: 1;
    text-align: right;
    position: relative;
}

.hero-image img {
    border-radius: var(--radius);
    box-shadow: 0 15px 30px var(--shadow);
    max-width: 100%;
    animation: fadeIn 1s ease 0.4s;
    animation-fill-mode: both;
}

/* ========== About Section ========== */
.about {
    background-color: var(--white);
    padding: 100px 0;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: 0 15px 30px var(--shadow);
}

/* ========== Services Section ========== */
.services {
    background-color: var(--background);
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 20px var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card h3, .service-card p {
    padding: 0 20px;
}

.service-card .price {
    font-weight: 700;
    color: var(--primary);
    font-size: 20px;
}

.service-card .btn {
    margin: 20px;
}

/* ========== Advantages Section ========== */
.advantages {
    background-color: var(--tertiary);
    padding: 100px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.advantage-icon svg {
    width: 100%;
    height: 100%;
}

/* ========== Cases Section ========== */
.cases {
    background-color: var(--white);
    padding: 100px 0;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: var(--background);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow);
}

.case-subtitle {
    color: var(--text-lighter);
    font-style: italic;
    margin-bottom: 15px;
}

.case-result {
    font-weight: 600;
    color: var(--primary);
    margin-top: 20px;
}

/* ========== FAQ Section ========== */
.faq {
    background-color: var(--background);
    padding: 100px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow);
}

.faq-item h3 {
    cursor: pointer;
    color: var(--primary);
    position: relative;
    padding-right: 30px;
    margin-bottom: 10px;
}

/* ========== Contact Section ========== */
.contact {
    background-color: var(--tertiary);
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info, .contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px var(--shadow);
    max-width: 100%; /* Ensure content doesn't overflow */
}

.map-placeholder {
    height: 200px;
    background-color: var(--gray-light);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-light);
}

/* Make iframe responsive */
iframe {
    max-width: 100%;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
    max-width: 100%; /* Ensure inputs don't overflow */
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.checkbox-group input {
    width: auto;
    margin-top: 5px;
}

.checkbox-group label {
    font-weight: normal;
    flex: 1; /* Take remaining width */
}

/* ========== Footer ========== */
.site-footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo a {
    display: inline-block;
    margin-bottom: 15px;
}

.company-description {
    margin-top: 15px;
    color: var(--tertiary);
}

.footer-contact h3, .footer-links h3 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
}

.footer-contact h3::after, .footer-links h3::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--secondary);
    bottom: -10px;
    left: 0;
}

.footer-contact a, .footer-links a {
    color: var(--tertiary);
}

.footer-contact a:hover, .footer-links a:hover {
    color: var(--secondary);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--tertiary);
}

/* ========== Legal Pages ========== */
.legal-page {
    background-color: var(--background);
    padding: 80px 0;
}

.legal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px var(--shadow);
}

.legal-content h2 {
    text-align: left;
    margin-top: 40px;
}

.legal-content h2::after {
    left: 0;
    transform: none;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cookie-table th, .cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.cookie-table th {
    background-color: var(--tertiary);
}

/* ========== Thank You Page ========== */
.thank-you {
    background-color: var(--background);
    padding: 100px 0;
    text-align: center;
}

.thank-you-content {
    background-color: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--secondary);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: var(--secondary);
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.thank-you-actions {
    margin-top: 30px;
}

/* ========== Cookie Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 0 -5px 20px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    max-width: 100vw; /* Prevent horizontal overflow */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.hidden {
    display: none;
}

.fade-out {
    opacity: 0;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* ========== Responsive Styles ========== */
@media (max-width: 1024px) {
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 30px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-image {
        margin-top: 30px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 20px var(--shadow);
        padding: 20px 0;
        transition: var(--transition);
        text-align: center; /* Center-align all nav items */
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 10px 20px;
        text-align: center; /* Ensure centered alignment */
    }
    
    .nav-menu a {
        display: inline-block; /* Better control over text alignment */
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Prevent content overflow */
    .container, section, .hero-content, .hero-image, 
    .about-content, .services-grid, .advantages-grid,
    .cases-grid, .contact-content, .faq-list {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure images don't cause overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .advantages-grid, .services-grid, .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-content {
        padding: 20px;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%; /* Full width buttons */
    }
    
    .cookie-buttons .btn {
        width: 100%; /* Full width buttons */
        margin-bottom: 10px;
    }
    
    /* Ensure proper text wrapping for links and small content */
    a, p, label, input, select, button {
        max-width: 100%;
        word-wrap: break-word;
    }
} 