/* ============================================
   RCI Immobilien – Modern Homepage Styles
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1a237e;
    --color-primary-light: #3949ab;
    --color-primary-dark: #0d1642;
    --color-accent: #2962ff;
    --color-accent-light: #448aff;
    --color-white: #ffffff;
    --color-bg: #f8f9fc;
    --color-bg-alt: #eef1f8;
    --color-text: #1a1a2e;
    --color-text-light: #64668b;
    --color-border: #e2e5f1;
    --color-success: #00c853;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-sm: 0 1px 3px rgba(26, 35, 126, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 35, 126, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 35, 126, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 35, 126, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Section Defaults --- */
.section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}

.section__subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-border);
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.header--scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary-dark);
}

.nav__logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.header--scrolled .nav__link {
    color: var(--color-text-light);
}

.header--scrolled .nav__link:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}


.nav__link--cta {
    background: var(--color-accent);
    color: var(--color-white) !important;
    margin-left: 8px;
}

.nav__link--cta:hover {
    background: var(--color-primary-light) !important;
}

.header--scrolled .nav__link--cta {
    color: var(--color-white) !important;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

.header--scrolled .nav__toggle span {
    background: var(--color-primary-dark);
}

/* ============================================
   PARALLAX BASE
   ============================================ */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 22, 66, 0.85) 0%, rgba(26, 35, 126, 0.7) 50%, rgba(41, 98, 255, 0.5) 100%);
    z-index: 1;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
    padding-top: 72px;
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero__badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-white);
    margin-bottom: 20px;
}

.text-highlight {
    color: var(--color-accent-light);
    position: relative;
}

.hero__text {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero__stats {
    display: flex;
    gap: 40px;
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__stat-number {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
}

.hero__stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.btn--white {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn--white:hover {
    background: var(--color-white);
    color: var(--color-primary-dark);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

/* ============================================
   PARALLAX DIVIDER
   ============================================ */
.parallax-divider {
    position: relative;
    height: 300px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-divider__overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 22, 66, 0.75);
}

.parallax-divider__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.parallax-divider__text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--color-white);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.hero__scroll a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    background: var(--color-white);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about__text {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about__features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.about__feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.about__feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(41, 98, 255, 0.08);
    color: var(--color-accent);
}

.about__feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--color-primary-dark);
}

.about__feature p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.about__visual {
    position: relative;
}

.about__image-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about__image-logo {
    width: 100%;
    height: 420px;
    background: linear-gradient(135deg, #f0f2f8 0%, #e4e8f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.about__image-logo img {
    max-width: 280px;
    width: 100%;
    height: auto;
}

.about__badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--color-accent);
    color: var(--color-white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.about__badge-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.about__badge-text {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.9;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    background: var(--color-bg);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card--featured {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    border-color: transparent;
    color: var(--color-white);
}

.service-card--featured .service-card__title {
    color: var(--color-white);
}

.service-card--featured .service-card__text {
    color: rgba(255, 255, 255, 0.8);
}

.service-card--featured .service-card__list li {
    color: rgba(255, 255, 255, 0.75);
}

.service-card--featured .service-card__list li::before {
    color: var(--color-accent-light);
}

.service-card--featured .service-card__icon {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

.service-card--featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(26, 35, 126, 0.3);
}

.service-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.service-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(41, 98, 255, 0.08);
    color: var(--color-accent);
    margin-bottom: 20px;
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.service-card__text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-card__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-card__list li {
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding-left: 20px;
    position: relative;
}

.service-card__list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* ============================================
   PROCESS
   ============================================ */
.process {
    background: var(--color-white);
}

.process__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
}

.process__grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary-light));
    opacity: 0.2;
}

.process__step {
    text-align: center;
    position: relative;
}

.process__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    border: 3px solid var(--color-white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.process__step:hover .process__number {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
    color: var(--color-white);
    transform: scale(1.1);
}

.process__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}

.process__text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    background: var(--color-bg);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.contact__text {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact__detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(41, 98, 255, 0.08);
    color: var(--color-accent);
}

.contact__detail strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--color-primary-dark);
}

.contact__detail p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.contact__link {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition);
}

.contact__link:hover {
    color: var(--color-accent);
}

/* Contact Form */
.contact__form-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.form__group {
    margin-bottom: 20px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form__group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 6px;
}

.form__group input,
.form__group select,
.form__group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: var(--transition);
    outline: none;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.1);
}

.form__group textarea {
    resize: vertical;
    min-height: 120px;
}

.form__group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364668b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Form Validation */
.form__error {
    display: block;
    color: #e53935;
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

.form__input--error {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1) !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   PRIVACY CHECKBOX
   ============================================ */
.form__group--checkbox {
    margin-top: 4px;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.form__checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.form__checkbox a {
    color: var(--color-accent);
    text-decoration: underline;
}

.form__checkbox a:hover {
    color: var(--color-accent-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .nav__logo {
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer .nav__logo-img {
    height: 48px;
}

.footer__desc {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer__links h4 {
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer__links li {
    margin-bottom: 10px;
}

.footer__links a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--color-white);
}

.footer__bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   LEGAL PAGES (Impressum, Datenschutz)
   ============================================ */
.legal__content {
    max-width: 800px;
}

.legal__text h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.legal__text h2:first-child {
    border-top: none;
    padding-top: 0;
}

.legal__text h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-primary-dark);
    margin-top: 28px;
    margin-bottom: 10px;
}

.legal__text p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal__text ul {
    margin: 12px 0;
    padding-left: 24px;
    list-style: disc;
}

.legal__text ul li {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 4px;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    z-index: 1001;
    transition: width 0.1s linear;
}

/* ============================================
   PARALLAX HOVER ZOOM
   ============================================ */
.parallax-divider {
    overflow: hidden;
}

.parallax-divider::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: inherit;
    background-attachment: inherit;
    background-position: inherit;
    background-size: inherit;
    background-repeat: inherit;
    transition: transform 0.6s ease;
    z-index: 0;
}

.parallax-divider:hover::before {
    transform: scale(1.05);
}

/* ============================================
   MOBILE CALL BAR
   ============================================ */
.mobile-call-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-call-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 950;
        background: var(--color-primary-dark);
        padding: 10px 12px;
        gap: 10px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }

    .mobile-call-bar__btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        font-family: var(--font-body);
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        background: var(--color-accent);
        color: var(--color-white, #fff);
        transition: var(--transition);
    }

    .mobile-call-bar__btn--secondary {
        background: transparent;
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        color: #fff;
    }

    .mobile-call-bar__btn:active {
        transform: scale(0.97);
    }

    /* Platz fuer die Call-Bar im Footer */
    .footer {
        padding-bottom: 80px;
    }

    /* Cookie Banner ueber der Call-Bar */
    .cookie-banner {
        bottom: 64px;
    }

    /* Back-to-top ueber der Call-Bar */
    .back-to-top {
        bottom: 80px;
    }
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--color-primary-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preloader__logo {
    height: 60px;
    margin-bottom: 24px;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

.preloader__bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.preloader__progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    border-radius: 3px;
    animation: preloaderBar 1.2s ease-in-out forwards;
}

@keyframes preloaderBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ============================================
   TYPEWRITER
   ============================================ */
.typewriter {
    border-right: 3px solid var(--color-accent-light);
    animation: blink 0.8s step-end infinite;
}

.typewriter--done {
    border-right-color: transparent;
    animation: none;
}

@keyframes blink {
    50% { border-right-color: transparent; }
}

/* ============================================
   REFERENCES
   ============================================ */
.references {
    background: var(--color-white);
    overflow: hidden;
}

.references__marquee {
    overflow: hidden;
    margin-bottom: 60px;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.references__track {
    display: flex;
    gap: 24px;
    animation: marquee 25s linear infinite;
    width: max-content;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.reference__item {
    flex-shrink: 0;
    padding: 16px 32px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    transition: var(--transition);
}

.reference__item:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.references__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.ref-stat {
    padding: 32px 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.ref-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ref-stat__number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.ref-stat__suffix {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.ref-stat__label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ============================================
   GOOGLE MAPS
   ============================================ */
.map-section {
    width: 100%;
    line-height: 0;
}

.map-section iframe {
    width: 100%;
    height: 400px;
    filter: grayscale(30%);
    transition: var(--transition);
}

.map-section iframe:hover {
    filter: grayscale(0%);
}

/* ============================================
   WHATSAPP CHAT WIDGET
   ============================================ */
.wa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 950;
}

/* Toggle Button */
.wa-toggle {
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    position: relative;
    animation: whatsappPulse 2s infinite;
}

.wa-toggle:hover {
    transform: scale(1.08);
}

.wa-toggle__close { display: none; }

.wa-widget--open .wa-toggle__icon { display: none; }
.wa-widget--open .wa-toggle__close { display: block; }
.wa-widget--open .wa-toggle { animation: none; background: #128C7E; }

.wa-toggle__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #e53935;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: badgeBounce 1s ease infinite;
}

.wa-widget--open .wa-toggle__badge,
.wa-widget--seen .wa-toggle__badge {
    display: none;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 12px rgba(37, 211, 102, 0.08); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* Chat Window */
.wa-chat {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    background: var(--color-white, #fff);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.wa-widget--open .wa-chat {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.wa-chat__header {
    background: #075E54;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wa-chat__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-chat__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    padding: 4px;
}

.wa-chat__header-info strong {
    display: block;
    font-size: 0.95rem;
}

.wa-chat__status {
    font-size: 0.75rem;
    opacity: 0.85;
}

.wa-chat__status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25D366;
    margin-right: 4px;
    vertical-align: middle;
}

.wa-chat__status--offline::before {
    background: #ffc107;
}

.wa-chat__close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: var(--transition);
}

.wa-chat__close:hover { opacity: 1; }

/* Chat Body */
.wa-chat__body {
    padding: 20px;
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8c3ba' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    max-height: 350px;
    overflow-y: auto;
}

.wa-chat__bubble {
    background: white;
    border-radius: 0 12px 12px 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #303030;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    max-width: 90%;
    position: relative;
    animation: bubbleIn 0.3s ease;
}

.wa-chat__bubble--hours {
    font-size: 0.82rem;
    color: #667;
}

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

/* FAQ Buttons */
.wa-chat__faq {
    margin-top: 8px;
}

.wa-chat__faq-title {
    font-size: 0.8rem;
    color: #667;
    margin-bottom: 8px;
}

.wa-faq-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: white;
    border: 1px solid #d4d4d4;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #075E54;
    cursor: pointer;
    transition: var(--transition);
}

.wa-faq-btn:hover {
    background: #075E54;
    color: white;
    border-color: #075E54;
}

/* Chat Footer */
.wa-chat__footer {
    padding: 12px 16px;
    background: #f0f0f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.wa-chat__input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: white;
    outline: none;
}

.wa-chat__send {
    width: 40px;
    height: 40px;
    background: #075E54;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.wa-chat__send:hover {
    background: #25D366;
}

/* Dark mode overrides */
[data-theme="dark"] .wa-chat__body {
    background-color: #1a2236;
    background-image: none;
}

[data-theme="dark"] .wa-chat__bubble {
    background: #2d3a52;
    color: #e2e8f0;
}

[data-theme="dark"] .wa-faq-btn {
    background: #2d3a52;
    border-color: #3d4a62;
    color: #25D366;
}

[data-theme="dark"] .wa-faq-btn:hover {
    background: #075E54;
    color: white;
}

[data-theme="dark"] .wa-chat__footer {
    background: #1a2236;
}

[data-theme="dark"] .wa-chat__input {
    background: #2d3a52;
    color: #e2e8f0;
}

/* Mobile */
@media (max-width: 480px) {
    .wa-chat {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 68px;
    }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.darkmode-toggle {
    position: fixed;
    top: 90px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
}

.darkmode-toggle:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

.darkmode-toggle__moon { display: none; }

/* Dark Mode Styles */
[data-theme="dark"] {
    --color-bg: #121828;
    --color-bg-alt: #1a2236;
    --color-white: #0f1724;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-border: #2d3a52;
    --color-primary-dark: #e2e8f0;
}

[data-theme="dark"] .header--scrolled {
    background: rgba(15, 23, 36, 0.95);
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .header--scrolled .nav__link {
    color: var(--color-text-light);
}

[data-theme="dark"] .header--scrolled .nav__link:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

[data-theme="dark"] .header--scrolled .nav__toggle span {
    background: var(--color-text);
}

[data-theme="dark"] .service-card {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
}

[data-theme="dark"] .service-card__title,
[data-theme="dark"] .process__title,
[data-theme="dark"] .section__title {
    color: var(--color-text);
}

[data-theme="dark"] .contact__form-wrapper {
    background: var(--color-bg-alt);
}

[data-theme="dark"] .form__group input,
[data-theme="dark"] .form__group select,
[data-theme="dark"] .form__group textarea {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .about__image-logo {
    background: linear-gradient(135deg, #1a2236 0%, #2d3a52 100%);
}

[data-theme="dark"] .ref-stat {
    background: var(--color-bg-alt);
}

[data-theme="dark"] .reference__item {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
}

[data-theme="dark"] .darkmode-toggle {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .darkmode-toggle__sun { display: none; }
[data-theme="dark"] .darkmode-toggle__moon { display: block; }

[data-theme="dark"] .legal__text h2 {
    border-top-color: var(--color-border);
}

[data-theme="dark"] .legal__text strong {
    color: var(--color-text);
}

[data-theme="dark"] .process__number {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #2d3a52 100%);
    border-color: var(--color-bg);
}

[data-theme="dark"] .cookie-banner {
    background: var(--color-bg-alt);
    border-top-color: var(--color-border);
}

[data-theme="dark"] .mobile-call-bar {
    background: #080c18;
}

[data-theme="dark"] .footer {
    background: #080c18;
}

[data-theme="dark"] .footer__bottom {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .map-section iframe {
    filter: grayscale(50%) invert(90%) hue-rotate(180deg);
}

[data-theme="dark"] .darkmode-toggle {
    background: #1a2236;
    border-color: #2d3a52;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    padding: 20px 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner--visible {
    transform: translateY(0);
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-banner__content p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.cookie-banner__content a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn--sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__text {
        max-width: 100%;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .parallax,
    .parallax-divider {
        background-attachment: scroll;
    }

    .references__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__visual {
        order: -1;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .process__grid::before {
        display: none;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transition: var(--transition);
        z-index: 999;
    }

    .nav__menu--open {
        right: 0;
    }

    .nav__link {
        width: 100%;
        padding: 12px 16px;
    }

    .nav__link--cta {
        margin-left: 0;
        text-align: center;
        margin-top: 16px;
    }

    .nav__toggle {
        display: flex;
        z-index: 1000;
    }

    .nav__toggle--active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav__toggle--active span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle--active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .process__grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .parallax-divider {
        height: 200px;
    }

    .cookie-banner__content {
        flex-direction: column;
        text-align: center;
    }

    .darkmode-toggle {
        top: auto;
        bottom: 148px;
        right: 28px;
    }

    .references__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .form__row {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding-top: 110px;
        min-height: 100vh;
        min-height: 100svh;
    }

    .hero__badge {
        font-size: 0.7rem;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .parallax-divider {
        height: 160px;
    }

    .parallax-divider__text {
        font-size: 1.1rem;
    }

    .hero__actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .contact__form-wrapper {
        padding: 24px;
    }
}
