/* BT Abogados - Estilos Globales & Responsivos */

:root {
    --primary-color: #0d3830; /* Verde oscuro institucional del mockup */
    --primary-hover: #145045;
    --accent-color: #00bfa5; /* Verde agua para detalles/botones si aplica */
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --footer-bg: #1a1a1a;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= HEADER & NAV ================= */
header {
    background: var(--bg-white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-main span {
    font-weight: 300;
}

.logo-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    text-decoration: none !important;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none !important;
}

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

.btn-outline-dark:hover {
    background-color: rgba(13, 56, 48, 0.05);
    text-decoration: none !important;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    background-color: #ccc;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-box {
    background-color: rgba(13, 56, 48, 0.9); /* Primary color with opacity */
    padding: 60px 50px;
    max-width: 650px;
    color: white;
    border-radius: 4px;
    animation: slideInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-box h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}

.hero-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
}

.page-header h1 {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.page-header p {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}


.hero-btns .btn-primary {
    background-color: white;
    color: var(--primary-color) !important;
}

.hero-btns .btn-primary:hover {
    background-color: #f0f0f0;
}

/* ================= COMMON SECTIONS ================= */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-suptitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-color);
    font-weight: 600;
}

.section-desc {
    max-width: 700px;
    margin: 20px auto 0;
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ================= PROPUESTA DE VALOR ================= */
.prop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 24px;
}

.prop-card {
    text-align: center;
    padding: 20px 10px;
}

.prop-card img {
    height: 50px;
    margin: 0 auto 20px;
}

.prop-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.prop-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.prop-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* 4-column prop grid variant (Estudio page) */
.prop-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Team member grid (Equipo page) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ================= HOME PILLARS ================= */
.home-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.home-pillar {
    padding: 40px 36px;
    border-right: 1px solid var(--border-color);
}

.home-pillar:last-child {
    border-right: none;
}

.home-pillar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 14px;
    line-height: 1.3;
}

.home-pillar p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.75;
}

/* ================= ÁREAS DETAIL (página Áreas) ================= */
.areas-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.area-detail-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 26px 22px 28px;
    background: var(--bg-white);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.area-detail-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    border-color: var(--primary-color);
}

.area-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.area-detail-header i {
    font-size: 1.4rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.area-detail-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.area-bajada {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.55;
    padding-left: 38px;
    margin-bottom: 28px;
}

.area-body {
    display: none;
}

.area-detail-card {
    display: flex;
    flex-direction: column;
}

.area-vermas {
    align-self: flex-start;
    margin-top: auto;
    margin-left: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.area-vermas i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.area-detail-card:hover .area-vermas {
    background-color: var(--primary-color);
    color: #fff;
}

.area-detail-card:hover .area-vermas i {
    transform: translateX(3px);
}

/* ================= CONTENIDO RICO (páginas internas) ================= */
.rich-content {
    font-size: 1.02rem;
    color: var(--text-light);
    line-height: 1.85;
}

.rich-content p {
    margin-bottom: 18px;
}

.rich-content ul,
.rich-content ol {
    margin: 0 0 18px 22px;
    padding-left: 18px;
}

.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }

.rich-content li {
    margin-bottom: 8px;
    list-style: inherit;
}

.rich-content h2,
.rich-content h3,
.rich-content h4 {
    color: var(--primary-color);
    line-height: 1.3;
    margin: 28px 0 12px;
}

.rich-content h2 { font-size: 1.4rem; }
.rich-content h3 { font-size: 1.2rem; }
.rich-content h4 { font-size: 1.05rem; }

.rich-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.rich-content strong, .rich-content b { color: var(--text-color); font-weight: 600; }

.rich-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 18px;
    margin: 0 0 18px;
    color: var(--text-light);
    font-style: italic;
}

.rich-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 28px 0;
}

/* ================= CONSULTORÍA SERVICES ================= */
.consultoria-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.consultoria-service-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 32px 28px;
    background: var(--bg-white);
}

.consultoria-service-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.35;
}

.consultoria-service-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.75;
}

/* ================= ÁREAS DE PRÁCTICA ================= */
.practice-section {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.practice-card {
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 4px;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.practice-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.practice-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.practice-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.practice-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.practice-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 25px;
}

.practice-card .arrow-link {
    color: var(--primary-color);
    font-size: 1.2rem;
    align-self: flex-start;
}

/* ================= CONSULTORÍA ================= */
.consultoria-section {
    background-color: var(--bg-light);
    padding: 0;
}

.consultoria-container {
    display: flex;
    flex-wrap: wrap;
}

.consultoria-content {
    flex: 1;
    min-width: 300px;
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.consultoria-image {
    flex: 1;
    min-width: 300px;
    background-image: url('consultoria-laboral.jpg');
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.consultoria-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.consultoria-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* ================= CLIENTES ================= */
.clients-section {
    border-top: 1px solid var(--border-color);
}

.clients-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.client-logo {
    height: 40px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: var(--transition);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.client-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Text-based logos for mockup if images are missing */
.client-text-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: #666;
    letter-spacing: -1px;
}

/* ================= TICKER CLIENTES ================= */
.ticker-wrap {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    margin-bottom: 30px;
}
.ticker-wrap::before,
.ticker-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
@media (max-width: 768px) {
    .ticker-wrap::before,
    .ticker-wrap::after { width: 24px; }
}
.ticker-wrap::before { left: 0;  background: linear-gradient(to right, #f9f9f9, transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(to left,  #f9f9f9, transparent); }
.ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: ticker-scroll 60s linear infinite;
    will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker-item {
    flex-shrink: 0;
    width: 12.5vw;          /* 8 logos visibles en desktop */
    padding: 0 1vw;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 125px;
}
.ticker-item img {
    max-height: 98px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: filter 0.3s, opacity 0.3s;
}
@media (max-width: 768px) {
    .ticker-item { width: 33.333vw; padding: 0 2vw; height: 95px; }  /* 3 logos visibles en mobile */
    .ticker-item img { max-height: 74px; }
}
.ticker-item:hover img { filter: grayscale(0%); opacity: 1; }
.ticker-text-logo {
    font-size: 0.82rem;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    transition: color 0.3s;
}
.ticker-item:hover .ticker-text-logo { color: #666; }

/* ================= GALERÍA COMPLETA DE LOGOS ================= */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 columnas en desktop */
    gap: 18px;
}
.logos-grid-item {
    height: 220px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.logos-grid-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 165px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}
.logos-grid-item:hover img { filter: grayscale(0%); opacity: 1; }
.logos-grid-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}
@media (max-width: 768px) {
    .logos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }  /* 2 columnas en mobile */
    .logos-grid-item { height: 170px; padding: 16px; }
    .logos-grid-item img { max-height: 120px; }
}

/* ================= CTA HABLEMOS ================= */
.hablemos-section {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
}

.hablemos-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.hablemos-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hablemos-icon {
    font-size: 3rem;
    color: var(--accent-color);
}

.hablemos-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.hablemos-text p {
    font-size: 1.1rem;
    font-weight: 300;
}

.hablemos-section .btn-outline {
    padding: 15px 40px;
}

/* ================= FOOTER ================= */
footer {
    background-color: var(--bg-white);
    color: var(--text-color);
    padding: 80px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-logo-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-logo-main span {
    font-weight: 300;
}

.footer-col p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-weight: 700;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer-col ul a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p, .footer-bottom a {
    font-size: 0.8rem;
    color: var(--text-light);
}


.footer-bottom-links {
    display: flex;
    gap: 20px;
}

/* ================= RESPONSIVE DESIGN ================= */

@media (max-width: 1200px) {
    .practice-grid               { grid-template-columns: repeat(2, 1fr); }
    .team-grid                   { grid-template-columns: repeat(3, 1fr); }
    .footer-grid                 { grid-template-columns: repeat(2, 1fr); }
    .areas-detail-grid           { grid-template-columns: repeat(3, 1fr); }
    .consultoria-services-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .hero-box h1 { font-size: 2.2rem; }

    .hablemos-flex  { flex-direction: column; text-align: center; }
    .hablemos-left  { flex-direction: column; }

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

    /* Navigation mobile */
    .mobile-menu-btn { display: block; }
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        transition: 0.4s ease-in-out;
        z-index: 999;
        overflow-y: auto;
    }
    .nav-links.active { left: 0; }
    .nav-links li     { width: 100%; text-align: center; }
    .nav-links a      { display: block; padding: 15px; font-size: 1.1rem; border-bottom: 1px solid var(--border-color); }
    .btn-contact      { margin-top: 20px; width: 100%; justify-content: center; }

    /* Consultoria: text before image on tablet/mobile */
    .consultoria-image   { order: 1; min-height: 280px; }
    .consultoria-content { order: 0; padding: 60px 5%; }
}

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

    .hero         { min-height: 500px; }
    .hero-box     { padding: 40px 30px; }
    .hero-box h1  { font-size: 1.8rem; }
    .section-title { font-size: 1.8rem; }

    .prop-grid   { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
    .prop-card   { padding: 24px 12px; }
    .prop-grid-4 { grid-template-columns: repeat(2, 1fr); }

    .practice-grid             { grid-template-columns: 1fr; }
    .team-grid                 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .areas-detail-grid         { grid-template-columns: repeat(2, 1fr); }
    .consultoria-services-grid { grid-template-columns: 1fr; }
    .home-pillars-grid         { grid-template-columns: 1fr; }
    .home-pillar               { border-right: none; border-bottom: 1px solid var(--border-color); }
    .home-pillar:last-child    { border-bottom: none; }

    .footer-grid   { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    section   { padding: 40px 0; }
    .hero-box { padding: 28px 20px; }

    .prop-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .prop-card {
        padding: 20px 16px;
        text-align: left;
        display: flex;
        align-items: flex-start;
        gap: 16px;
    }
    .prop-card i  { font-size: 1.6rem; flex-shrink: 0; margin-bottom: 0; }
    .prop-card h3 { margin-bottom: 6px; }
    .prop-grid-4  { grid-template-columns: 1fr; }

    .team-grid           { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .area-detail-card    { padding: 24px 20px; }

    .hero-btns      { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; }
}
