/* variables de la raiz */
:root{
    /* colores */
    --clr-negro: black;
    --clr-blanco: white;
    --clr-dorado: #f4d229;
    --clr-amarillo-claro: #e6d690;
    --clr-azul: #7892c2;
    --clr-verde-whsp: #25D366;
    --clr-rojo-gmail: #EA4335;
    /* fuentes */
    --ff-title: 'Roboto', sans-serif;
    --ff-title-weight: 500;
    --ff-paragraph: 'Poppins', sans-serif;
    --ff-paragraph-weight: 300;
    
    /* Fluid Typographic Scale */
    /* minimum, prefered, and maximum values */
    --font-size-sm: clamp(0.8rem, 0.17vw + 0.76rem, 0.96rem);
    --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.31rem); /* paragraph size */
    --font-size-md: clamp(1.25rem, 0.61vw + 1.1rem, 1.88rem);
    --font-size-lg: clamp(1.56rem, 1vw + 1.31rem, 2.5rem);
    --font-size-xl: clamp(1.95rem, 1.56vw + 1.56rem, 3.75rem);
    /* vw = viewport width. 1vw is 1% of viewport 
    The prefered value is calclated with scale vw and fixed part rem
    the values where calculated with online tool to create a perfect linear function
    and those values are the coefficients */
    /* Assign the base size to the paragraph variable */
    --ff-paragraph-size: var(--font-size-base);
}

*,
*::before,
*::after{
    box-sizing: border-box;
}

/* asigna las variables de la raiz al comportamiento por defecto en body */
body{
    font-family: var(--ff-paragraph);
    font-weight: var(--ff-paragraph-weight);
    font-size: var(--ff-paragraph-size);
    line-height: 1.6;
}

/* MOBILE STYLES (Default) */
.navbars{
    position: fixed;
    width: 100%;
    z-index: 1030; /* High z-index to ensure it's above everything */
    top: 0;
    left: 0;
}

/* Social Icons Bar - Mobile (TOP BAR) */
.social-top-navbar {
    padding: 0.3rem 0;
    min-height: auto;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: var(--clr-negro) !important;
}

/* Ensure social navbar is above main navbar on mobile */
.social-top-navbar {
    position: relative;
    z-index: 1031; /* Higher than main navbar */
}

.main-navbar {
    position: relative;
    z-index: 1030; /* Lower than social navbar */
}

/* Social icons styling for mobile */
ul.iconos {
    list-style-type: none;
    display: flex;
    justify-content: center; 
    margin: 0;
    padding: 0;
    gap: 1rem;
}

ul.iconos li {
    display: inline-block;
}

/* iconos centrados */
.header-icons {
    list-style-type: none;
    margin-inline: auto;
    width: 100%;
}

/* Main Navigation - Mobile */
.main-navbar.navbar {
    padding: 0.5rem 0;
}

/*Navbar for mobile max width of 992px*/
/* creates a toogle menu and push it to right of the navbar*/
@media (max-width: 991.98px) {
    .main-navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Push toggler to the right */
    .navbar-toggler {
        order: 2;
        margin-left: auto;
    }

    /* Keep brand on left */
    .header-name {
        order: 1;
    }

    /* and toggler menu*/
    .navbar-collapse{
        order: 3;
        flex-basis: 100%; /* Take full width */
        text-align: right;
    }

    /* Align nav items to right */
    .navbar-nav {
        text-align: right;
    }

    .nav-item {
        display: block;
    }
    
    .nav-link {
        text-align: right;
        padding: 0.75rem 1rem;
        display: block;
    }
       
    /* Hide desktop icons on mobile */
    .header-icons-desktop {
        display: none;
    }
}

/* centrar mas el nombre y el boton de la navbar secundaria */
.navbar-brand{
    margin-left: 0.8rem;
}

/*para aplicar un estilo a una clase anidada toca partir desde la clase nodriza */
.navbar .navbar-brand{
    color: var(--clr-dorado);
    font-size: 1.25rem;
}

.navbar-toggler {
    margin-right: 0.8rem;
}

/* Hide desktop social icons on mobile */
.header-icons-desktop {
    display: none;
}


.header-name {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* Perfect center */
    margin: 0 !important;
    z-index: 1;
}

/* DESKTOP STYLES (min-width: 992px) */
@media (min-width: 992px) {
    /* Hide mobile social icons bar */
    .social-top-navbar {
        display: none !important;
    }
    
    /* Main navbar adjustments for desktop */
    .main-navbar.navbar {
        padding: 0.5rem 0;
        height: auto;
    }
    
    .navbars {
        position: fixed;
        width: 100%;
        z-index: 1030;
    }
    
    /* SIMPLE GRID SOLUTION - Perfect centering between elements */
    .main-navbar .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /*3 columns brand is in the center column auto (takes enough space only to fit the content), the other 1fr takes the remaining space and divided by two in this case */
        align-items: center;
        max-width: 100%;
        padding: 0 2rem;
        gap: 1rem;
    }
    
    /* PERFECT CENTERING FOR BRAND */
    .header-name {
        position: static;
        transform: none;
        margin: 0 !important;
        justify-self: center;
        text-align: center;
        width: 100%; /* Ensure it takes full width of grid cell */
    }
    
    .navbar .header-name .navbar-brand {
        color: var(--clr-dorado);
        font-size: 1.5rem;
        margin: 0 auto; /* This centers the brand within its container */
        white-space: nowrap;
        display: block; /* Make it block level for proper centering */
        text-align: center;
    }
    
    /* Desktop social icons */
    .header-icons-desktop {
        display: block;
        flex: 0 0 auto;
        margin-right: auto; /* Push to left */
    }
    
    .social-icons-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 0.8rem;
    }
    
    .social-icons-list li {
        display: inline-block;
    }
    
    /* Desktop navigation menu - Push to right */
    .navbar-collapse {
        display: flex !important;
        justify-self: end;
        flex-grow: 0;
        margin-left: auto; /* Push to right */
    }
    
    .navbar-nav {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    /* Hover effects for desktop */
    .navbar .navbar-collapse .navbar-nav .nav-item .nav-link:hover {
        color: var(--clr-dorado);
    }
    
    .header-icons-desktop:hover {
        color: var(--clr-dorado);
    }
}




/* LARGE DESKTOP OPTIMIZATION */
@media (min-width: 1200px) {
    .main-navbar .container {
        padding: 0 3rem;
    }
    
    .nav-link {
        padding: 0.5rem 1.2rem;
    }
}

/* Control navbar height for different screen sizes */
@media only screen and (min-width: 600px) {
    .navbar {
        height: auto !important; 
    }
}

@media only screen and (min-width: 768px) {
    .navbar {
        height: auto !important; 
    }
}

/* Control button size */
@media only screen and (min-width: 768px) {
    .navbar-toggler {
        height: 3rem !important; 
        width: 4rem !important;
    }
}

/* display background color black on navbar scroll */
.navbarScroll.navbarDark {
    background-color: black;
}

.navbar {
    transition: none !important;
}



/* Empuja el contenido del blog debajo de las 2 barras en móvil */
.layout-wrapper {
  margin-top: 115px !important;
}

/* En escritorio (donde se oculta #navbar1) */
@media (min-width: 992px) {
  .layout-wrapper {
    margin-top: 80px !important;
  }
}

.header {
  padding-top: 1rem !important;
}