/* ------------------------
   Reset & Variables globales
   ------------------------*/
:root {
    --color-peach: #f6c1b4;   /* barra superior y secciones claras */
    /*--color-dark:  #181818;*/   /* fondo general oscuro */
    --color-dark:  #000000;   /* fondo negro -> Chica */
    --color-brown: #9c7b6d;   /* footer marrón */
    --color-light: #ffffff;
    --color-muted: #c0c0c0;
    --max-width:  1100px;
    --gutter: 1.5rem;
    --pink: #fcd4c9f5;
    --gray: #939393;
    --black: #333333;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: var(--color-dark);
    color: var(--color-muted);
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--color-light);
}

p {
    font-size: 0.95rem;
}

.container {
    width: min(100% - calc(var(--gutter) * 2), var(--max-width));
    margin-inline: auto;
}

/* ------------------------
   Barra superior / Navbar ELEGANTE TRANSPARENTE
   ------------------------*/
.navbar {
    background: transparent;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--gutter);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar__logo img {
    height: 90px;
    transition: all 0.3s ease;
}

.navbar__links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    font-size: 0.9rem;
}

.navbar__links a {
    color: var(--color-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.8rem;
    position: relative;
    padding: 0.5rem 0;
}

.navbar__links a:hover {
    color: var(--color-peach);
    font-weight: 400;
}

.navbar__links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    background: var(--color-peach);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar__links a:hover::after {
    width: 100%;
}

.navbar.scrolled {
    background:black ;
    backdrop-filter: blur(15px);
    height: 70px;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.navbar.scrolled .navbar__logo img {
    height: 60px;
}

/* ------------------------
   Sección Hero principal
   ------------------------*/
.hero {
    position: relative;
    min-height: 100vh;
    min-width: 200px; /* Nunca será más pequeña de 200px */
    width: 100%;      /* Intentará ocupar todo el ancho disponible */
    height: auto;     /* Mantiene la proporción para que no se vea estirada */
    /* background: url("../logo-imagen/Ataxaia.jpeg") center/cover no-repeat; */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: var(--gutter);
    margin-top: -40px;
}

.hero__title {
    font-size: clamp(3rem, 6vw + 1rem, 5rem);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f6c1b4 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.hero__title::before,
.hero__title::after {
    content: '❖';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #f6c1b4;
    opacity: 0.7;
}

.hero__title::before {
    left: -40px;
}

.hero__title::after {
    right: -40px;
}

.hero__subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
    color: var(--color-light);
}

.hero__tagline {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
}

/* ------------------------
   Botones compactos
   ------------------------*/
.connection-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.compact-btn {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.9rem !important;
    min-width: 120px;
}

/* ------------------------
   Controles del Dispositivo
   ------------------------*/
.device-controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.control-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--color-peach);
}

.device-controls .device-btn {
    margin: 0.5rem;
}

/* ------------------------
   Estados y Lecturas
   ------------------------*/
.status-readings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.reading-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reading-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-peach);
}

.gray-label {
    color: #bebebe;
    font-size: 0.9rem;
}

.reading {
    font-size: 1.8rem;
    color: var(--color-light);
    margin: 1rem 0;
}

#bleState {
    font-weight: bold;
}

/* ------------------------
   Botones (MODIFICADOS CON PEACH PREMIUM)
   ------------------------*/
.device-btn {
    font-family: "Crimson Text", serif;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #f6c1b4;
    border: 2px solid #f6c1b4;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0.25rem;
}

.device-btn:hover:not([disabled]) {
    background: #f6c1b4;
    color: var(--black);
}

.device-btn[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

.connectButton {
    color: #24af37;
    border: 2px solid #24af37;
}

.connectButton:hover:not([disabled]) {
    background: #24af37;
    color: var(--black);
}

.disconnectButton {
    color: #d13a30;
    border: 2px solid #d13a30;
}

.disconnectButton:hover:not([disabled]) {
    background: #d13a30;
    color: var(--black);
}

/* Botones ON/OFF ahora del mismo color */
.onButton, .offButton {
    color: #f6c1b4;
    border: 2px solid #f6c1b4;
}

.onButton:hover:not([disabled]),
.offButton:hover:not([disabled]) {
    background: #f6c1b4;
    color: var(--black);
}

/* ------------------------
   Sección Intro
   ------------------------*/
.intro {
    background: var(--color-dark);
    padding-block: 4rem;
    text-align: center;
}

.intro__icon {
    width: 80px;
    margin-inline: auto;
    margin-bottom: 1.5rem;
}

.intro p {
    max-width: 700px;
    margin-inline: auto;
    margin-bottom: 1rem;
}

/* ------------------------
   Contacto & Footer
   ------------------------*/
.unified-footer {
    background: var(--color-dark);
    color: var(--color-muted);
}

.footer-content {
    padding-block: 3rem 1rem;
}

.contact-section {
    margin-bottom: 2rem;
}

.contact__heading {
    margin-top: 0,35rem;
    text-align: center;
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
}

.contact__title {
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 3rem;
    color: var(--color-light);
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
}

.contact__item h4 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-light);
}

.contact__item address,
.contact__item p {
    font-style: normal;
    line-height: 1.5;
}

.contact__item a {
    color: var(--color-muted);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact__item a:hover {
    opacity: 0.7;
    color: var(--color-peach);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-light);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--color-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--color-peach);
    padding-left: 5px;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    font-size: 0.75rem;
}

.footer-bottom p {
    margin: 0;
    color: var(--color-muted);
}

.footer-bottom a {
    color: var(--color-muted);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-bottom a:hover {
    opacity: 0.7;
    color: var(--color-peach);
}

/* ------------------------
   Responsive tweaks
   ------------------------*/
@media (max-width: 820px) {
    .navbar__links {
        gap: 1.5rem;
    }
    
    .navbar__links a {
        font-size: 0.75rem;
    }

    .status-readings {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 2rem;
    }

    .contact__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 540px) {
    html {
        font-size: 15px;
    }

    .navbar {
        height: 70px;
        padding-inline: 1rem;
        flex-direction: column;
        justify-content: center;
        gap: 0.8rem;
    }

    .navbar__logo img {
        height: 30px;
    }

    .navbar__links {
        gap: 1rem;
    }

    .navbar__links a {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    .device-controls {
        gap: 1rem;
    }

    .control-section {
        padding: 1rem;
    }

    .device-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .connection-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .compact-btn {
        min-width: 140px;
        width: 100%;
        max-width: 200px;
    }

    .footer-content {
        padding-block: 3rem 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .contact-section {
        margin-bottom: 3rem;
    }

    .contact__title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
}
