:root {

--azul: #0E3A4C;
--gris: #F4F6F8;
--beige: #EFE8DF;
--texto: #1c1c1c;

}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--gris);
    color: var(--texto);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.header {
    background:white;
    border-bottom:1px solid #e5e5e5;
    position:sticky;
    top:0;
    z-index:1000;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    height: 60px;
}

.menu-toggle{
    display:none;
    width:30px;
    height:22px;
    position:relative;
    background:none;
    border:none;
    cursor:pointer;
}

.menu-toggle span{
    position:absolute;
    width:100%;
    height:3px;
    background:var(--azul);
    left:0;
    transition:0.3s;
}

.menu-toggle span:nth-child(1){ top:0; }
.menu-toggle span:nth-child(2){ top:9px; }
.menu-toggle span:nth-child(3){ bottom:0; }

/* Animación a X */
.menu-toggle.active span:nth-child(1){
    transform:rotate(45deg);
    top:9px;
}

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

.menu-toggle.active span:nth-child(3){
    transform:rotate(-45deg);
    bottom:9px;
}

#overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.5);
    opacity:0;
    visibility:hidden;
    transition:0.3s;
    z-index:999;
}

#overlay.active{
    opacity:1;
    visibility:visible;
}

body.no-scroll{
    overflow:hidden;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav a {
    text-decoration:none;
    color:var(--azul);
    font-weight:500;
    position:relative;
}

nav a::after {
    content:"";
    position:absolute;
    width:0;
    height:2px;
    left:0;
    bottom:-4px;
    background:var(--azul);
    transition:width 0.25s ease;
}

nav a:hover::after{
    width:100%;
}

.btn-nav {
    background: #0E3A4C;
    color: white;
    padding: 8px 14px;
    border-radius: 4px;
}

section {
padding:80px 0;
background:white;
margin-bottom:40px;
}

section:nth-of-type(even){
    background: var(--gris);
}

h2{
    font-size:32px;
    margin-bottom:20px;
}

h3{
    font-family:'Playfair Display', serif;
    font-size: 20px;
    margin-top:25px;
    margin-bottom:10px;
    color:var(--azul);
}

.hero {
    position: relative;
    background: url('../img/hero.jpeg') center/cover no-repeat;
    height: 80vh;
    display: flex;
    align-items: center;
    color: white;
    min-height: 80vh;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14,58,76,0.75);
}

.hero-content {
    position: relative;
    max-width: 800px;
    padding-top:20px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p{
    font-size:18px;
    opacity: 0.95;
    line-height:1.6;
    text-align: justify;
}

.especialidad {
    background:var(--beige);
}

.especialidad h2{
    font-family:'Playfair Display', serif;
    font-size:32px;
    margin-bottom:20px;
}

.especialidad p{
    max-width:900px;
    font-size:17px;
    line-height:1.6;
    text-align: justify;
}

.especialidad-content{
    position: relative;
    max-width: 800px;
}

.especialidad-content h2{
    font-family:'Playfair Display', serif;
    font-size:32px;
    margin-bottom:20px;
}

.especialidad-content p{
    max-width:900px;
    font-size:17px;
    line-height:1.6;
    text-align: justify;
}

p {
    margin-bottom:20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 750px;
    line-height: 1.7;
}

a{
    text-decoration: none;
}

.nota-notarial{
    font-size:15px;
    opacity:0.9;
    border-left:3px solid var(--beige);
    padding-left:12px;
}

.btn-primary {
    background:var(--azul);
    color:white;
    padding:14px 28px;
    border-radius:5px;
    text-decoration:none;
    font-weight:500;
}

.btn-primary:hover{
    transform: translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    opacity: 0.9;
}

.btn-secondary {
    border: 2px solid #0E3A4C;
    padding: 10px 20px;
    text-decoration: none;
    color: #0E3A4C;
}

.btn-primary,
.btn-secondary {
    display:inline-block;
    margin-top:10px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    text-align: justify;
    background:white;
    border-radius:6px;
    padding:30px;
    border:1px solid #eaeaea;
    transition:0.25s;
    text-decoration:none;
    color:var(--texto);
    display:block;
    cursor:pointer;
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.card h3{
    font-family:'Playfair Display', serif;
    margin-bottom:10px;
    color:var(--azul);
}
.card:hover h3{
    color:#08313f;
}

.confianza{
    background:white;
}

.confianza-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
    margin-top:40px;
}

.confianza-item{
    background:var(--gris);
    padding:30px;
    border-radius:6px;
}

.confianza-item h3{
    font-family:'Playfair Display', serif;
    margin-bottom:10px;
    color:var(--azul);
}

.cta {
    background:var(--beige);
    text-align:center;
}

.cta h2{
    margin-bottom: 20px;
}

.contacto-content{
    max-width: 800px;
}

.contacto-content ul{
    list-style: none;
}

.contacto-content li{
    padding: .6em 0;
}

.contacto-content button{
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

.campo{
    border-radius: 12px;
    width: 380px;
    padding: .5em;
    border-style: none;
}

footer {
    background: #0E3A4C;
    color: white;
    text-align: center;
    padding: 20px;
}

.whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 6px 15px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
}

.whatsapp img{
    width:32px;
    height:32px;
}

.whatsapp:hover{
    transform:scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hide {
    display: none;
}

.alert {
    margin: 5px;
}

@media (max-width:768px){
    p{
        font-size:15px;
    }

    .menu-toggle{
        display:block;
        z-index:1001;
    }

    nav{
        position:fixed;
        top:0;
        right:-100%;
        width:75%;
        height:100vh;
        background:white;
        transition:0.3s;
        z-index:1000;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    nav.active{
        right:0;
    }

    nav ul{
        flex-direction:column;
        gap:20px;
    }
    
        nav ul li{
        margin:10px 0;
    }

    .hero{
        height:auto;
        padding:80px 0;
    }

    .hero h1{
        font-size:30px;
    }

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

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