/* ============================================================
   DOMUS SOLUCIONES ESTRUCTURALES — Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: #0B090A;
    background-color: #FFFFFF;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----- TYPOGRAPHY ----- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    line-height: 1.1;
    color: #1B4965;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: 0.02em; }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: 0.03em; }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: 0.04em; }

p, li, .text-body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #0B090A;
}

.text-muted {
    color: #8D99AE;
}

.text-accent {
    color: #1B4965;
}

.section-tag {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1B4965;
    margin-bottom: 0.5rem;
}

/* ----- BUTTONS ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.01em;
}

.btn--primary {
    background-color: #1B4965;
    color: #FFFFFF;
    border-color: #1B4965;
}

.btn--primary:hover {
    background-color: #0F3145;
    border-color: #0F3145;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(27, 73, 101, 0.3);
}

.btn--secondary {
    background-color: transparent;
    color: #1B4965;
    border-color: #1B4965;
}

.btn--secondary:hover {
    background-color: #1B4965;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn--outline-light {
    background-color: transparent;
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.btn--outline-light:hover {
    background-color: #FFFFFF;
    color: #1B4965;
}

.btn--large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

.btn--cta-nav {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
}

/* ----- HEADER ----- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #FFFFFF;
    border-bottom: 1px solid rgba(141, 153, 174, 0.2);
    transition: all 0.3s ease;
}

.header--scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.header__logo {
    height: 45px;
    width: auto;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.header__nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2B2D42;
    position: relative;
    padding: 0.3rem 0;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1B4965;
    transition: width 0.3s ease;
}

.header__nav-link:hover::after,
.header__nav-link.active::after {
    width: 100%;
}

.header__nav-link:hover {
    color: #1B4965;
}

/* Dropdown */
.header__dropdown {
    position: relative;
}

.header__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid rgba(141, 153, 174, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem 0;
}

.header__dropdown:hover .header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown-menu .header__nav-link {
    display: block;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.header__dropdown-menu .header__nav-link::after {
    display: none;
}

.header__dropdown-menu .header__nav-link:hover {
    background-color: rgba(27, 73, 101, 0.05);
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.2rem;
}

/* Menu toggle (mobile) */
.header__menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.header__menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #1B4965;
    transition: all 0.3s ease;
}

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

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

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

/* ===== LOADER ===== */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    min-height: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.loader__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(27, 73, 101, 0.1);
    border-top-color: #1B4965;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== MAIN CONTENT ===== */
.main {
    margin-top: 75px;
    min-height: calc(100vh - 75px - 300px);
}

.main > .page-content:first-child .hero,
.main > .page-content:first-child .page-header {
    padding-top: 3rem;
}

.page-content {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    background-color: #1B4965;
    color: #FFFFFF;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__content h1 {
    color: #FFFFFF;
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
}

.hero__content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hero__image--placeholder {
    min-height: 400px;
}

.placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 400px;
    background: rgba(255,255,255,0.06);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 4px;
}

.placeholder-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
}

.placeholder-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
    font-family: 'Inter', sans-serif;
}

/* ===== SECTION COMMON ===== */
.section {
    padding: 5rem 0;
}

.section--dark {
    background-color: #2B2D42;
    color: #FFFFFF;
}

.section--dark h2,
.section--dark h3 {
    color: #FFFFFF;
}

.section--gray {
    background-color: #F8F9FA;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #8D99AE;
    margin-top: 0.8rem;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: #FFFFFF;
    border: 1px solid rgba(141, 153, 174, 0.2);
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: #1B4965;
}

.service-card__icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 73, 101, 0.08);
}

.service-card__icon img {
    width: 32px;
    height: 32px;
}

.service-card h3 {
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 0.95rem;
    color: #8D99AE;
    line-height: 1.7;
}

.service-card .btn {
    margin-top: 1.5rem;
}

/* ===== DIFFERENTIATORS ===== */
.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.diff-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.diff-card:hover {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.diff-card__number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: #8D99AE;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.diff-card h3 {
    color: #FFFFFF;
    margin-bottom: 0.8rem;
}

.diff-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== TOOLS SECTION ===== */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.tool-card {
    background: #FFFFFF;
    border: 1px solid rgba(141, 153, 174, 0.2);
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
}

.tool-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.tool-card--featured {
    border-left: 4px solid #1B4965;
}

.tool-card__badge {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    background: #1B4965;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin-bottom: 0.8rem;
}

.tool-card p {
    color: #8D99AE;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid rgba(141, 153, 174, 0.2);
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #1B4965;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #8D99AE;
    margin-top: 0.3rem;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2B2D42;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #8D99AE;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #0B090A;
    background: #FFFFFF;
    transition: border-color 0.3s ease;
    border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1B4965;
    box-shadow: 0 0 0 3px rgba(27, 73, 101, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== COTIZADOR / SCORE ===== */
.tool-page {
    max-width: 800px;
    margin: 0 auto;
}

.tool-result {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    border: 2px solid #1B4965;
    animation: fadeIn 0.5s ease;
}

.tool-result--visible {
    display: block;
}

.tool-result__amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: #1B4965;
    margin: 1rem 0;
}

.tool-result__sub {
    color: #8D99AE;
    font-size: 0.9rem;
}

.score-bar {
    height: 12px;
    background: #E9ECEF;
    margin: 1rem 0;
    position: relative;
}

.score-bar__fill {
    height: 100%;
    transition: width 0.8s ease;
}

.score-bar__fill--bajo { background: #28A745; }
.score-bar__fill--moderado { background: #FFC107; }
.score-bar__fill--alto { background: #DC3545; }

.score-indicator {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #8D99AE;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(141, 153, 174, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checklist-item:hover {
    border-color: #1B4965;
}

.checklist-item.active {
    border-color: #1B4965;
    background: rgba(27, 73, 101, 0.05);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1B4965;
}

/* ===== CONTACT PAGE ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info__item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info__icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 73, 101, 0.08);
    flex-shrink: 0;
}

.contact-info__text h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.contact-info__text p {
    font-size: 0.9rem;
    color: #8D99AE;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background-color: #1B4965;
    color: #FFFFFF;
    padding: 2.5rem 0 2.5rem;
    text-align: center;
}

.page-header h1 {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CONTENT PAGE ===== */
.content-page {
    padding: 4rem 0;
}

.content-page h2 {
    margin-bottom: 1.5rem;
}

.content-page p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.content-page ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-page ul li {
    list-style: disc;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== FEATURES LIST ===== */
.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-item__icon {
    width: 24px;
    height: 24px;
    background: #1B4965;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.feature-item__text h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.feature-item__text p {
    font-size: 0.9rem;
    color: #8D99AE;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #2B2D42;
    color: #FFFFFF;
    padding: 3rem 0 1.5rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer__logo {
    height: 35px;
    width: auto;
    margin-bottom: 1rem;
}

.footer__tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #FFFFFF;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.footer__links ul li {
    margin-bottom: 0.6rem;
}

.footer__links ul li a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer__links ul li a:hover {
    color: #FFFFFF;
}

.footer__contact p {
    margin-bottom: 0.5rem;
}

.footer__contact a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer__contact a:hover {
    color: #FFFFFF;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ALERT ===== */
.alert {
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #1B4965;
    background: rgba(27, 73, 101, 0.05);
}

.alert--success {
    border-left-color: #28A745;
    background: rgba(40, 167, 69, 0.05);
}

.alert--warning {
    border-left-color: #FFC107;
    background: rgba(255, 193, 7, 0.05);
}

.alert--error {
    border-left-color: #DC3545;
    background: rgba(220, 53, 69, 0.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .services-grid,
    .diff-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .header__menu-toggle {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        gap: 1.5rem;
    }

    .header__nav.open {
        right: 0;
    }

    .header__nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }

    .header__dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: none;
    }

    .header__dropdown.open .header__dropdown-menu {
        display: block;
    }

    .btn--cta-nav {
        width: 100%;
        text-align: center;
    }

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

    .hero__content p {
        margin: 0 auto 2rem;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__image {
        display: none;
    }

    .hero {
        padding: 2rem 0 3rem;
    }

    .services-grid,
    .diff-grid,
    .tools-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .features-list {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .page-header {
        padding: 1.5rem 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero__content h1 {
        font-size: 2.5rem;
    }

    .main {
        margin-top: 65px;
    }

    .main > .page-content:first-child .hero,
    .main > .page-content:first-child .page-header {
        padding-top: 1.5rem;
    }
}
