/* ==========================================================
   InvertirBien.es
   style.css
   Parte 1
   ========================================================== */

/* ===== RESET ===== */

*,
*::before,
*::after{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:Arial, Helvetica, sans-serif;

    background:#f5f7fa;

    color:#222;

    line-height:1.8;

    font-size:17px;

}

/* ===== VARIABLES ===== */

:root{

    --primary:#0f766e;

    --primary-dark:#115e59;

    --secondary:#14b8a6;

    --light:#ffffff;

    --gray:#6b7280;

    --border:#e5e7eb;

    --background:#f5f7fa;

    --shadow:0 10px 25px rgba(0,0,0,.08);

    --radius:12px;

}

/* ===== CONTENEDOR ===== */

.container{

    width:min(1150px,90%);

    margin:auto;

}

/* ===== ENLACES ===== */

a{

    color:var(--primary);

    text-decoration:none;

    transition:.25s;

}

a:hover{

    color:var(--primary-dark);

}

/* ===== TITULOS ===== */

h1{

    font-size:2.4rem;

    margin-bottom:15px;

}

h2{

    font-size:2rem;

    margin-bottom:25px;

    color:#111827;

}

h3{

    font-size:1.35rem;

    margin-bottom:15px;

}

p{

    margin-bottom:20px;

}

/* ===== HEADER ===== */

header{

    background:#ffffff;

    position:sticky;

    top:0;

    z-index:999;

    box-shadow:0 2px 10px rgba(0,0,0,.08);

}

header .container{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 0;

}

.logo a{

    font-size:1.8rem;

    font-weight:bold;

    color:var(--primary);

}

nav ul{

    list-style:none;

    display:flex;

    gap:30px;

}

nav a{

    color:#333;

    font-weight:600;

}

nav a:hover{

    color:var(--primary);

}

/* ===== HERO ===== */

.hero{

    background:linear-gradient(135deg,#0f766e,#14b8a6);

    color:white;

    padding:110px 0;

}

.hero h2{

    color:white;

    font-size:3rem;

    max-width:700px;

}

.hero p{

    margin-top:25px;

    max-width:750px;

    font-size:1.1rem;

}

/* ===== BOTON ===== */

.btn{

    display:inline-block;

    margin-top:20px;

    background:white;

    color:var(--primary);

    padding:15px 30px;

    border-radius:50px;

    font-weight:bold;

    transition:.3s;

}

.btn:hover{

    transform:translateY(-3px);

    box-shadow:var(--shadow);

}

/* ===== SECCIONES ===== */

section{

    padding:80px 0;

}

section:nth-child(even){

    background:white;

}

/* ===== LISTAS ===== */

ul{

    padding-left:25px;

}

li{

    margin-bottom:12px;

}

/* ===== TARJETAS ===== */

.cards{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));

    gap:30px;

    margin-top:40px;

}

.card{

    background:white;

    padding:35px;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    transition:.3s;

}

.card:hover{

    transform:translateY(-8px);

}

.card h3{

    color:var(--primary);

} 

/* ==========================================================
   STYLE.CSS
   PARTE 2
   ========================================================== */

/* ========= INTRO ========= */

.intro{

    background:#ffffff;

}

.intro p{

    max-width:900px;

}

/* ========= DESTACADOS ========= */

.destacado{

    background:#eef8f7;

}

.destacado h3{

    color:var(--primary);

    margin-top:35px;

}

/* ========= PRIMEROS PASOS ========= */

.primeros-pasos article{

    margin-bottom:35px;

}

/* ========= CONCEPTOS ========= */

.conceptos-clave article{

    background:#ffffff;

    padding:30px;

    margin:25px 0;

    border-left:5px solid var(--primary);

    border-radius:8px;

    box-shadow:0 5px 15px rgba(0,0,0,.05);

}

/* ========= ERRORES ========= */

.errores article{

    margin-bottom:45px;

}

.errores h3{

    color:#b91c1c;

}

/* ========= FAQ ========= */

.faq{

    background:#ffffff;

}

.faq details{

    background:#f8fafc;

    border:1px solid var(--border);

    border-radius:10px;

    margin-bottom:18px;

    padding:18px;

    transition:.25s;

}

.faq details:hover{

    border-color:var(--primary);

}

.faq summary{

    cursor:pointer;

    font-weight:bold;

    font-size:1.05rem;

    list-style:none;

}

.faq summary::-webkit-details-marker{

    display:none;

}

.faq summary::after{

    content:"+";

    float:right;

    color:var(--primary);

    font-size:1.3rem;

}

.faq details[open] summary::after{

    content:"−";

}

.faq details p{

    margin-top:15px;

}

/* ========= CTA ========= */

.cta{

    text-align:center;

    background:linear-gradient(135deg,#0f766e,#14b8a6);

    color:white;

}

.cta h2{

    color:white;

}

.cta p{

    max-width:700px;

    margin:20px auto;

}

.cta .btn{

    background:white;

}

/* ========= NEWSLETTER ========= */

.newsletter{

    background:#ffffff;

    text-align:center;

}

.newsletter p{

    max-width:850px;

    margin:auto;

    margin-bottom:25px;

}

/* ========= TABLAS ========= */

table{

    width:100%;

    border-collapse:collapse;

    margin:40px 0;

}

th{

    background:var(--primary);

    color:white;

}

th,
td{

    padding:15px;

    border:1px solid var(--border);

    text-align:left;

}

tr:nth-child(even){

    background:#f9fafb;

}

/* ========= BLOQUES DE AVISO ========= */

.alert{

    background:#fff8e1;

    border-left:5px solid #f59e0b;

    padding:20px;

    margin:30px 0;

    border-radius:8px;

}

.success{

    background:#ecfdf5;

    border-left:5px solid #10b981;

    padding:20px;

    margin:30px 0;

    border-radius:8px;

}

.info{

    background:#eff6ff;

    border-left:5px solid #2563eb;

    padding:20px;

    margin:30px 0;

    border-radius:8px;

}

/* ========= IMÁGENES ========= */

img{

    max-width:100%;

    display:block;

    border-radius:12px;

}

figure{

    margin:35px 0;

}

figcaption{

    margin-top:10px;

    color:var(--gray);

    font-size:.9rem;

}

/* ========= FORMULARIOS ========= */

form{

    margin-top:30px;

}

input,
textarea,
select{

    width:100%;

    padding:14px;

    margin-bottom:18px;

    border:1px solid var(--border);

    border-radius:8px;

    font-size:16px;

    background:white;

}

textarea{

    resize:vertical;

    min-height:180px;

}

input:focus,
textarea:focus,
select:focus{

    outline:none;

    border-color:var(--primary);

    box-shadow:0 0 0 3px rgba(20,184,166,.15);

}

button{

    background:var(--primary);

    color:white;

    border:none;

    padding:15px 28px;

    border-radius:8px;

    cursor:pointer;

    font-size:16px;

    transition:.25s;

}

button:hover{

    background:var(--primary-dark);

}

/* ========= FOOTER ========= */

footer{

    background:#111827;

    color:#d1d5db;

    padding:70px 0 30px;

}

.footer-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));

    gap:40px;

}

footer h3{

    color:white;

    margin-bottom:20px;

}

footer ul{

    list-style:none;

    padding:0;

}

footer li{

    margin-bottom:12px;

}

footer a{

    color:#d1d5db;

}

footer a:hover{

    color:white;

}

footer hr{

    border:none;

    border-top:1px solid #374151;

    margin:45px 0 25px;

}

.copyright{

    text-align:center;

    color:#9ca3af;

    font-size:.9rem;

}

/* ==========================================================
   STYLE.CSS
   PARTE 3
   Responsive, utilidades y componentes
========================================================== */

/* ========= UTILIDADES ========= */

.text-center{
    text-align:center;
}

.text-left{
    text-align:left;
}

.text-right{
    text-align:right;
}

.hidden{
    display:none;
}

.mt-1{margin-top:10px;}
.mt-2{margin-top:20px;}
.mt-3{margin-top:30px;}
.mt-4{margin-top:40px;}
.mt-5{margin-top:60px;}

.mb-1{margin-bottom:10px;}
.mb-2{margin-bottom:20px;}
.mb-3{margin-bottom:30px;}
.mb-4{margin-bottom:40px;}
.mb-5{margin-bottom:60px;}

.pt-5{
    padding-top:60px;
}

.pb-5{
    padding-bottom:60px;
}

/* ========= BADGES ========= */

.badge{

    display:inline-block;

    padding:8px 16px;

    background:var(--primary);

    color:white;

    border-radius:30px;

    font-size:.9rem;

    font-weight:bold;

}

/* ========= BLOQUE DE CONTENIDO ========= */

.content-box{

    background:white;

    border-radius:12px;

    padding:35px;

    box-shadow:var(--shadow);

    margin:35px 0;

}

/* ========= CITA ========= */

blockquote{

    border-left:5px solid var(--primary);

    background:#f8fafc;

    padding:25px;

    margin:35px 0;

    font-style:italic;

}

/* ========= CÓDIGO ========= */

pre{

    overflow:auto;

    background:#1f2937;

    color:white;

    padding:20px;

    border-radius:10px;

}

code{

    font-family:Consolas, monospace;

}

/* ========= BREADCRUMBS ========= */

.breadcrumb{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

    list-style:none;

    margin:25px 0;

    padding:0;

}

.breadcrumb li{

    color:var(--gray);

}

.breadcrumb li::after{

    content:"/";

    margin-left:10px;

}

.breadcrumb li:last-child::after{

    display:none;

}

/* ========= PAGINACIÓN ========= */

.pagination{

    display:flex;

    justify-content:center;

    gap:10px;

    margin:50px 0;

}

.pagination a{

    padding:12px 18px;

    background:white;

    border:1px solid var(--border);

    border-radius:8px;

}

.pagination a:hover{

    background:var(--primary);

    color:white;

}

/* ========= CONTENEDOR ADSENSE ========= */

.ad-container{

    margin:50px auto;

    padding:15px;

    text-align:center;

    background:#fafafa;

    border:1px dashed #d1d5db;

    border-radius:10px;

    min-height:120px;

}

/* ========= BOTÓN VOLVER ARRIBA ========= */

#backToTop{

    position:fixed;

    right:25px;

    bottom:25px;

    width:50px;

    height:50px;

    border-radius:50%;

    background:var(--primary);

    color:white;

    display:flex;

    justify-content:center;

    align-items:center;

    text-decoration:none;

    box-shadow:var(--shadow);

    transition:.3s;

}

#backToTop:hover{

    transform:translateY(-4px);

}

/* ========= EFECTOS ========= */

.fade{

    transition:.35s;

}

.fade:hover{

    opacity:.9;

}

.card,
.btn,
button{

    transition:.3s;

}

/* ========= RESPONSIVE ========= */

@media (max-width:900px){

    header .container{

        flex-direction:column;

        gap:20px;

    }

    nav ul{

        flex-wrap:wrap;

        justify-content:center;

        gap:15px;

    }

    .hero{

        padding:80px 0;

    }

    .hero h2{

        font-size:2.2rem;

    }

    h2{

        font-size:1.7rem;

    }

    .cards{

        grid-template-columns:1fr;

    }

    .footer-grid{

        grid-template-columns:1fr;

    }

}

@media (max-width:600px){

    body{

        font-size:16px;

    }

    h1{

        font-size:2rem;

    }

    .hero h2{

        font-size:1.8rem;

    }

    section{

        padding:60px 0;

    }

    .btn{

        width:100%;

        text-align:center;

    }

    table{

        display:block;

        overflow-x:auto;

    }

}