/* =========================================
   DOM - Centro de Diagnóstico Veterinário
   ULTRA PREMIUM & LUXURY DESIGN SYSTEM
   ========================================= */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,700;0,900;1,700&display=swap');

/* === CSS VARIABLES === */
:root {
    /* Colors - Brand Refinement Palette */
    --primary-deep: #0A1405;
    --primary-green: #4c6c43;
    --accent-sage: #7f9b7e;
    --accent-tan: #c7b099;
    --text-pure: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);
    --bg-dark: #050A02;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --whatsapp-green: #25D366;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;

    /* Spacing */
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Transitions */
    --transition-lux: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-pure);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* === TYPE === */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(to right, #e0d1c1, var(--accent-tan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    font-family: var(--font-display);
    font-weight: 800;
}

/* === MODAL === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal__content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    padding: 4rem 2rem;
    z-index: 1;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.modal.active .modal__content {
    transform: translateY(0);
}

/* === LAYOUT === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--spacing-2xl) 0;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    padding: 1.5rem 0;
    transition: var(--transition-lux);
    background: transparent;
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 10, 2, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo-img {
    height: 60px;
    filter: brightness(0) invert(1);
    /* Logo will be white on dark */
}

.nav__menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.nav__link:hover,
.nav__link.active {
    color: var(--accent-sage);
    transform: translateY(-2px);
}

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

.hero .container {
    width: 100%;
    margin: 0 auto;
    z-index: 2;
}

.hero__visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    z-index: 1;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.5) sepia(0.3) hue-rotate(70deg) saturate(0.7);
    /* Deeper tint and darker for better text contrast */
}

.hero__visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-dark) 0%, rgba(5, 10, 2, 0.4) 40%, transparent 100%);
}

.hero__content {
    max-width: 800px;
    margin-left: 0;
    padding-left: 0;
}

.hero__subtitle {
    color: var(--accent-sage);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    margin-bottom: 1rem;
    display: block;
}

.hero__title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    /* Refined size */
    line-height: 1.3;
    margin-bottom: 2rem;
    max-width: 700px;
    font-weight: 700;
    /* Less heavy */
    letter-spacing: -0.02em;
}

.hero__description {
    font-size: 0.95rem;
    /* Smaller, more elegant */
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 450px;
    line-height: 1.8;
    /* More breathing space */
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.2rem;
    /* Slighly smaller buttons */
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: var(--transition-lux);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--text-pure);
}

.btn-primary:hover {
    background: var(--accent-sage);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(76, 108, 67, 0.3);
}

.btn-secondary {
    border: 1px solid var(--accent-tan);
    color: var(--accent-tan);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary-green);
    background: var(--primary-green);
    color: var(--text-pure);
}

/* === SERVICES === */
.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    /* Cinematic hairline gap */
    background: var(--border-glass);
    margin-top: 4rem;
}

.service-card {
    background: var(--bg-card);
    padding: 4rem 2rem;
    height: 100%;
    position: relative;
    transition: var(--transition-lux);
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.service-card:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(76, 108, 67, 0.2);
}

.service-card__icon {
    font-size: 2.5rem;
    color: var(--accent-tan);
    margin-bottom: 2rem;
    transition: var(--transition-lux);
}

.service-card:hover .service-card__icon {
    color: var(--text-pure);
    transform: scale(1.1);
}

.service-card__title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card__description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === FEATURES === */
.info-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* Balanced proportions */
    gap: 6rem;
    align-items: center;
    margin-bottom: 8rem;
}

.info-row__image {
    border: 1px solid var(--border-glass);
    padding: 1rem;
    overflow: hidden;
    transition: var(--transition-lux);
}

.info-row__image img {
    width: 100%;
    filter: grayscale(1);
    transition: 0.8s;
}

.info-row:hover .info-row__image img {
    filter: grayscale(0);
    transform: scale(1.05);
}

/* === TESTIMONIALS === */
.testimonials {
    background: var(--primary-deep);
    position: relative;
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-card__text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-pure);
}

.testimonial-card__author {
    color: var(--accent-tan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* === FOOTER === */
.footer {
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border-glass);
}

.footer__main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer__logo-img {
    height: 40px;
    filter: brightness(0) invert(1);
    /* Forces white color from any source color */
    margin-bottom: 2rem;
}

.footer__about p {
    color: var(--text-muted);
}

.footer h4 {
    color: var(--accent-tan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 1rem;
}

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
}

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

/* === WHATSAPP === */
.whatsapp-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    background: var(--whatsapp-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    z-index: 3000;
    transition: 0.5s;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background: #20BA5A;
}

/* === ANIMATIONS === */
[data-scroll] {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scroll].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .container {
        padding: 0 4rem;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .info-row__text {
        order: 1;
    }

    .info-row__image {
        order: 2;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero__visual {
        display: none;
    }

    .hero {
        text-align: center;
        padding-top: 120px;
    }

    .hero__content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header__logo-img {
        height: 50px;
    }

    .nav__menu {
        display: none;
        /* In a real project we'd add a burger, but for now let's simplify for mobile */
    }

    .hero {
        min-height: auto;
        padding: 140px 0 60px;
    }

    .hero__title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.2rem;
    }

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

    .service-card {
        padding: 3rem 1.5rem;
    }

    .testimonial-card__text {
        font-size: 1.5rem;
        line-height: 1.5;
    }

    .footer {
        padding: 4rem 0 2rem;
    }

    .footer__main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__logo-img {
        margin: 0 auto 2rem;
    }

    .footer h4 {
        margin-top: 2rem;
    }

    .whatsapp-btn {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        font-size: 2rem;
    }

    /* Modal mobile fixes */
    .modal__content {
        width: 95%;
        padding: 2.5rem 1.5rem;
        max-height: 85vh;
    }

    .modal__close {
        top: 0.5rem !important;
        right: 0.5rem !important;
        font-size: 1.3rem !important;
    }
}

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

    .hero__buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 0.75rem;
    }

    .hero__subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.2em;
    }

    .hero__description {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card__title {
        font-size: 1.2rem;
    }

    .service-card__description {
        font-size: 0.9rem;
    }

    /* Modal even smaller screens */
    .modal__content {
        padding: 2rem 1.2rem;
    }

    .modal__header h2 {
        font-size: 1.5rem !important;
    }

    .modal__header p {
        font-size: 0.9rem !important;
    }

    .modal__header i {
        font-size: 2.5rem !important;
    }

    input[type="password"] {
        font-size: 0.9rem !important;
        padding: 1rem !important;
    }
}