/* ==========================================================
   RESET
========================================================== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Roboto',sans-serif;
    background:url("../img/fondo.jpg") center center / cover fixed;
    color:#333;
}

/* ==========================================================
   HEADER
========================================================== */
header{
    background:#000;
    color:#fff;
    position:relative;
    padding:20px 40px;
}

.logo-container{
    display:flex;
    align-items:center;
    gap:20px;
}

.logo-container img{
    height:65px;
}

header h1{
    font-size:2rem;
}

header p{
    color:#ccc;
}

/* ==========================================================
   BOTÓN COTIZAR
========================================================== */
.btn-cotizar{
    position:absolute;
    right:30px;
    top:25px;
    background:#f1c40f;
    color:#000;
    text-decoration:none;
    padding:12px 22px;
    border-radius:6px;
    font-weight:bold;
}

.btn-cotizar:hover{
    background:#ffd84d;
    transform:translateY(-2px);
}

/* ==========================================================
   MENÚ (BASE DESKTOP)
========================================================== */
nav{
    background:#f1c40f;
    position:sticky;
    top:0;
    z-index:999;
    text-align:center;
}

nav a{
    display:inline-block;
    color:#000;
    text-decoration:none;
    padding:16px 22px;
    font-weight:bold;
}

nav a:hover,
nav a.active{
    background:#d68910;
    color:#fff;
}

/* ==========================================================
   SECCIONES
========================================================== */
.section{
    display:none;
    max-width:1200px;
    margin:auto;
    padding:50px 20px;
}

.section.active{
    display:block;
}

/* ==========================================================
   HERO
========================================================== */
#inicio{
    max-width:100%;
    width:100%;
    padding:0;
    margin:0;
}

.hero{
    width:100%;
    position:relative;
}

.img-presentacion{
    width:100%;
    display:block;
}

.hero-texto{
    position:absolute;
    top:8%;
    right:6%;
    max-width:450px;
    width:40%;
    color:#fff;
    text-align:right;
}

/* ==========================================================
   GRID / CARDS
========================================================== */
.grid{
    display:flex;
    flex-wrap:wrap;
    gap:25px;
    justify-content:center;
}

.card{
    background:#fff;
    flex:1 1 calc(50% - 25px);
    min-width:280px;
    border-radius:12px;
    padding:25px;
    box-shadow:0 10px 25px rgba(0,0,0,.10);
}

.card img{
    width:100%;
    height:260px;
    object-fit:contain;
}

/* ==========================================================
   FLIP CARDS
========================================================== */

/* =========================
   PORTAFOLIO (GRID LIMPIO)
========================= */

#portafolio .grid{
    display:flex;
    flex-wrap:wrap;
    gap:25px;
    justify-content:center;
}

/* TARJETA FLIP */
.card-flip{
    flex:1 1 calc(33.333% - 25px);
    min-width:280px;
    perspective:1200px;
}

/* CONTENEDOR */
.card-inner{
    position:relative;
    width:100%;
    height:340px;
    transition:transform .8s;
    transform-style:preserve-3d;
    cursor:pointer;
}

/* ACTIVAR GIRO */
.card-inner.is-flipped{
    transform:rotateY(180deg);
}

/* FRENTE Y REVERSO */
.card-front,
.card-back{
    position:absolute;
    width:100%;
    height:100%;
    border-radius:12px;
    backface-visibility:hidden;
    overflow:hidden;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
}

/* FRONT */
.card-front img{
    width:100%;
    height:80%;
    object-fit:cover;
}

.card-front p{
    padding:12px;
    text-align:center;
    font-weight:bold;
}

/* BACK */
.card-back{
    background:#1b1b1b;
    color:#fff;
    transform:rotateY(180deg);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:25px;
}

/* =========================
   RESPONSIVE PORTAFOLIO
========================= */

@media(max-width:992px){
    .card-flip{
        flex:1 1 calc(50% - 20px);
    }
}

@media(max-width:768px){
    .card-flip{
        flex:1 1 100%;
    }
}

.card-inner.is-flipped{
    transform:rotateY(180deg);
}


/* ==========================================================
   FOOTER
========================================================== */
footer{
    background:#000;
    color:#fff;
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    padding:35px 40px;
}

/* ==========================================================
   ANIMACIONES
========================================================== */
img{
    max-width:100%;
    display:block;
}

.card,
.card-flip{
    animation:fadeUp .6s ease;
}

@keyframes fadeUp{
    from{opacity:0; transform:translateY(25px);}
    to{opacity:1; transform:translateY(0);}
}

/* ==========================================================
   TABLET
========================================================== */
@media(max-width:992px){
    .hero-texto{ width:60%; }
    .card{ flex:1 1 100%; }
    .card-flip{ flex:1 1 calc(50% - 20px); }
}

/* ==========================================================
   MOBILE
========================================================== */
@media(max-width:768px){

header{
    text-align:center;
    padding:20px;
}

.logo-container{
    flex-direction:column;
}

.btn-cotizar{
    position:static;
    display:inline-block;
    margin-top:15px;
}

nav a{
    display:block;
    border-bottom:1px solid rgba(0,0,0,.1);
}

.hero-texto{
    left:50%;
    top:50%;
    width:90%;
    transform:translate(-50%,-50%);
    text-align:center;
}

.grid{
    flex-direction:column;
}

.card,
.card-flip{
    width:100%;
}

footer{
    flex-direction:column;
    text-align:center;
}
}

/* ==========================================================
   SMALL MOBILE
========================================================== */
@media(max-width:480px){

.hero-texto p{
    display:none;
}

.btn-cotizar{
    width:100%;
}

/* =========================
   HAMBURGUESA
========================= */

.menu-toggle{
    display:none;
    background:#f1c40f;
    padding:14px;
    font-size:26px;
    text-align:center;
    cursor:pointer;
}

/* DESKTOP */
nav a{
    display:inline-block;
}

/* MOBILE */
@media(max-width:768px){

.menu-toggle{
    display:block;
}

nav a{
    display:none;
    width:100%;
    text-align:center;
    padding:14px;
    border-bottom:1px solid rgba(0,0,0,.1);
}

/* cuando se abre */
nav.open a{
    display:block;
}
}

}

/* ==========================================================
   REDES SOCIALES
========================================================== */
.social-icons{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    margin-top:20px;
}

.social-icons a{
    color:#fff;
    font-size:40px;
    transition:0.3s;
}

.social-icons a:hover{
    color:#f1c40f;
    transform:scale(1.2);
}