/* =========================================================
   HIDROCONTROL - STYLE.CSS
   Portal de Hidroponía Inteligente y Panel de Control
   Parte 1: Base, variables, header, menú y login
========================================================= */

/* =========================================================
   01. VARIABLES GENERALES
========================================================= */
:root {
    --color-primary: #157a3d;
    --color-primary-dark: #0f5e2d;
    --color-primary-light: #23a65b;
    --color-secondary: #e6f7ec;
    --color-bg: #f4f8f3;
    --color-white: #ffffff;
    --color-dark: #102719;
    --color-text: #1c2b22;
    --color-muted: #5d6f63;
    --color-border: #dce8df;
    --color-danger: #c0392b;
    --color-warning: #f39c12;
    --color-info: #2980b9;
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-medium: 0 14px 35px rgba(0,0,0,0.15);
    --shadow-strong: 0 18px 45px rgba(0,0,0,0.22);
    --radius-small: 10px;
    --radius-medium: 18px;
    --radius-large: 28px;
    --transition: all 0.3s ease;
}

/* =========================================================
   02. RESET GENERAL
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    width: 100%;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 6px;
}

/* =========================================================
   03. CONTENEDOR
========================================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =========================================================
   04. HEADER PRINCIPAL
========================================================= */
.top-header {
    width: 100%;
    background: rgba(255,255,255,0.97);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.top-header.scrolled {
    background: rgba(255,255,255,0.99);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

/* =========================================================
   05. BARRA SUPERIOR DEL HEADER
========================================================= */
.header-top-bar {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-white);
    font-size: 13px;
    padding: 8px 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-top-content p {
    margin: 0;
}

.header-contact {
    font-weight: bold;
}

/* =========================================================
   06. CUERPO DEL HEADER
========================================================= */
.header-main {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    font-size: 30px;
}

.logo-text h1 {
    color: var(--color-primary-dark);
    font-size: 30px;
    line-height: 1;
    margin-bottom: 3px;
}

.logo-text small {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: bold;
}

/* =========================================================
   07. MENÚ DE NAVEGACIÓN
========================================================= */
.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    padding: 10px 0;
    position: relative;
}

.nav a::after {
    content: "";
    width: 0;
    height: 3px;
    background: var(--color-primary);
    position: absolute;
    left: 0;
    bottom: 0;
    border-radius: 30px;
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--color-primary);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

/* =========================================================
   08. ACCIONES DEL HEADER
========================================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-toggle,
.panel-shortcut {
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 11px 18px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 8px 18px rgba(21,122,61,0.25);
}

.login-toggle:hover,
.panel-shortcut:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.menu-btn {
    display: none;
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 22px;
}

/* =========================================================
   09. PANEL DE LOGIN
========================================================= */
.login-panel {
    position: absolute;
    right: 5%;
    top: 132px;
    width: 330px;
    background: var(--color-white);
    border-radius: 22px;
    box-shadow: var(--shadow-medium);
    padding: 20px;
    border: 1px solid rgba(21,122,61,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: var(--transition);
    z-index: 1200;
}

.login-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.login-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.login-title span {
    width: 42px;
    height: 42px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-title h3 {
    color: var(--color-primary-dark);
    font-size: 20px;
    margin-bottom: 3px;
}

.login-title p {
    color: var(--color-muted);
    font-size: 13px;
}

/* =========================================================
   10. FORMULARIO DE LOGIN
========================================================= */
.login-form label {
    display: block;
    color: var(--color-text);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 12px;
    outline: none;
    transition: var(--transition);
}

.login-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(21,122,61,0.12);
}

.login-form button {
    width: 100%;
    padding: 13px;
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.login-form button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.error-login {
    color: var(--color-danger);
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
}

.login-help {
    margin-top: 14px;
    padding: 12px;
    background: var(--color-secondary);
    border-radius: 14px;
    font-size: 13px;
    color: var(--color-text);
}

.login-help p {
    margin-bottom: 4px;
}

/* =========================================================
   11. LOGIN CUANDO YA EXISTE SESIÓN
========================================================= */
.login-status {
    text-align: center;
}

.user-icon {
    width: 70px;
    height: 70px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.login-status h3 {
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

.user-name {
    font-weight: bold;
    color: var(--color-text);
}

.user-role {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.login-link,
.logout-link {
    display: block;
    padding: 11px;
    border-radius: 12px;
    color: var(--color-white);
    font-weight: bold;
    margin-top: 8px;
}

.login-link {
    background: var(--color-primary);
}

.logout-link {
    background: var(--color-danger);
}

.login-link:hover,
.logout-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* =========================================================
   12. BOTONES GENERALES
========================================================= */
.btn,
.btn-outline,
.btn-danger {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 12px;
    font-weight: bold;
    margin: 6px 8px 6px 0;
    transition: var(--transition);
}

.btn {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 8px 18px rgba(21,122,61,0.25);
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background: #9f2f24;
    transform: translateY(-2px);
}


/* =========================================================
   13. HERO GENERAL
========================================================= */
.hero {
    padding: 120px 0 90px;
    background:
        radial-gradient(circle at 12% 20%, rgba(21,122,61,0.14), transparent 28%),
        linear-gradient(135deg, #eaf8ef, #ffffff);
    position: relative;
    overflow: hidden;
}

.hero-home {
    background:
        linear-gradient(90deg, rgba(244,255,247,0.98) 0%, rgba(233,248,238,0.94) 45%, rgba(255,255,255,1) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    background: rgba(21,122,61,0.08);
    border-radius: 50%;
    right: -160px;
    top: 40px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 55px;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: fadeUp 0.8s ease both;
}

.tag,
.section-label {
    display: inline-block;
    background: var(--color-secondary);
    color: var(--color-primary);
    padding: 7px 15px;
    border-radius: 30px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.text-left {
    text-align: left;
}

.hero h2 {
    font-size: 52px;
    color: var(--color-dark);
    margin-bottom: 22px;
    line-height: 1.12;
}

.hero p {
    font-size: 18px;
    margin-bottom: 18px;
    color: #2d4335;
}

.hero-actions {
    margin-top: 12px;
}

.hero-image {
    position: relative;
    animation: fadeZoom 0.9s ease both;
}

.hero-image::before {
    content: "";
    position: absolute;
    inset: -18px;
    background: rgba(21,122,61,0.12);
    border-radius: 34px;
    z-index: -1;
}

.hero-image img,
.hero img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: var(--shadow-strong);
}

.hero-image-card {
    position: relative;
}

.floating-card {
    position: absolute;
    left: -25px;
    bottom: 28px;
    width: 285px;
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    box-shadow: var(--shadow-medium);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(21,122,61,0.12);
}

.floating-card span {
    width: 48px;
    height: 48px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card strong {
    color: var(--color-primary-dark);
}

.floating-card p {
    margin: 0;
    font-size: 13px;
    color: var(--color-muted);
}

/* =========================================================
   14. ESTADÍSTICAS
========================================================= */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 26px;
}

.hero-stats div {
    background: var(--color-white);
    padding: 16px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
}

.hero-stats strong {
    display: block;
    font-size: 27px;
    color: var(--color-primary-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.hero-stats span {
    font-size: 13px;
    color: var(--color-muted);
    font-weight: bold;
}

.stats-center {
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* =========================================================
   15. ENCABEZADOS DE PÁGINA
========================================================= */
.page-header {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1466692476868-aef1dfb1e735?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    text-align: center;
    padding: 115px 20px;
    position: relative;
}

.page-header h2 {
    font-size: 46px;
    margin-bottom: 12px;
    line-height: 1.15;
}

.page-header p {
    max-width: 890px;
    margin: auto;
    font-size: 18px;
    color: rgba(255,255,255,0.92);
}

.page-hidroponia {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1598880940080-ff9a29891b85?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.page-sistema {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1589923188900-85dae523342b?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.page-automatizacion {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.page-cultivos {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1523348837708-15d4a09cfac2?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.page-equipo {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.page-contacto {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.94), rgba(35,166,91,0.90)),
        url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

/* =========================================================
   16. SECCIONES GENERALES
========================================================= */
.section {
    padding: 90px 0;
    position: relative;
}

.bg-light {
    background: var(--color-white);
}

.bg-green {
    background:
        radial-gradient(circle at 12% 20%, rgba(21,122,61,0.10), transparent 28%),
        var(--color-secondary);
}

.title {
    text-align: center;
    color: var(--color-primary-dark);
    font-size: 38px;
    margin-bottom: 18px;
    line-height: 1.2;
}

.section-description {
    max-width: 880px;
    margin: 0 auto 46px;
    text-align: center;
    font-size: 18px;
    color: #3d4d43;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 55px;
    align-items: center;
}

.grid-2 h2 {
    color: var(--color-primary-dark);
    font-size: 35px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.grid-2 p {
    margin-bottom: 14px;
    color: #304333;
}

/* =========================================================
   17. IMÁGENES CON NOTAS
========================================================= */
.img-rounded {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow-medium);
}

.image-stack {
    position: relative;
}

.image-note {
    position: absolute;
    left: 25px;
    bottom: 25px;
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    padding: 15px 18px;
    box-shadow: var(--shadow-medium);
    max-width: 300px;
    border-left: 5px solid var(--color-primary);
}

.image-note strong {
    color: var(--color-primary-dark);
}

.image-note p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--color-muted);
}

/* =========================================================
   18. TARJETAS GENERALES
========================================================= */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.cards-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cards-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--color-white);
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(21,122,61,0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    width: 0;
    height: 4px;
    left: 0;
    top: 0;
    background: var(--color-primary);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-medium);
}

.card:hover::before {
    width: 100%;
}

.card img {
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 17px;
}

.card h3 {
    color: var(--color-primary-dark);
    margin-bottom: 10px;
    font-size: 21px;
}

.card p {
    color: #324537;
    margin-bottom: 10px;
}

.card ul {
    margin-top: 10px;
    padding-left: 22px;
}

.card li {
    color: #324537;
}

.card-icon {
    width: 45px;
    height: 45px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 22px;
}

.feature-card .card-icon {
    margin-top: -8px;
}

.module-card span {
    display: inline-flex;
    width: 55px;
    height: 55px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 18px;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    margin-bottom: 15px;
}

.profile {
    min-height: 500px;
}

/* =========================================================
   19. LISTA DE COMPONENTES
========================================================= */
.component-list {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.component-item {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 34px;
    align-items: center;
    background: var(--color-white);
    padding: 28px;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
    transition: var(--transition);
}

.component-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.component-item:nth-child(even) {
    background: #fbfffc;
}

.component-item img {
    width: 100%;
    height: 305px;
    object-fit: cover;
    border-radius: 23px;
}

.component-item h3 {
    color: var(--color-primary-dark);
    font-size: 26px;
    margin-bottom: 12px;
}

.component-item p {
    color: #304333;
    margin-bottom: 10px;
}

.component-item ul {
    padding-left: 22px;
    margin-top: 10px;
}

/* =========================================================
   20. LISTAS DE BENEFICIOS
========================================================= */
.benefit-list {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.benefit-list div {
    background: var(--color-white);
    padding: 18px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    border-left: 5px solid var(--color-primary);
}

.benefit-list strong {
    color: var(--color-primary-dark);
    display: block;
    margin-bottom: 4px;
}

.benefit-list p {
    margin: 0;
    color: var(--color-muted);
}

/* =========================================================
   21. FLUJO DEL SISTEMA
========================================================= */
.flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.flow div {
    background: var(--color-white);
    color: var(--color-primary-dark);
    padding: 20px 26px;
    border-radius: 18px;
    font-weight: bold;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.12);
}

.flow span {
    color: var(--color-primary);
    font-size: 30px;
    font-weight: bold;
}

/* =========================================================
   22. TABLAS
========================================================= */
.table-box {
    overflow-x: auto;
    background: var(--color-white);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 17px;
    text-align: left;
    font-size: 15px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #e4e9e5;
    color: #304333;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: #f1faf4;
}

/* =========================================================
   23. LÍNEA DE TIEMPO
========================================================= */
.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    position: relative;
}

.timeline-item {
    background: var(--color-white);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
    transition: var(--transition);
    position: relative;
}

.timeline-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.timeline-item span {
    width: 45px;
    height: 45px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 14px;
}

.timeline-item h3 {
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

.timeline-item p {
    color: var(--color-muted);
    font-size: 14px;
}

/* =========================================================
   24. FORMULARIOS Y CONTACTO
========================================================= */
.contact-box {
    background: var(--color-white);
    padding: 30px;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
}

.contact-box input,
.contact-box textarea,
.contact-box select {
    width: 100%;
    padding: 15px;
    margin-bottom: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    background: var(--color-white);
    color: var(--color-text);
    transition: var(--transition);
}

.contact-box input:focus,
.contact-box textarea:focus,
.contact-box select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(21,122,61,0.12);
}

.contact-box textarea {
    height: 165px;
    resize: vertical;
}

.contact-box button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.contact-box button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* =========================================================
   25. CAJAS INFORMATIVAS Y MAPA
========================================================= */
.info-box {
    margin-top: 22px;
    background: var(--color-white);
    padding: 22px;
    border-left: 6px solid var(--color-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.info-box p {
    margin-bottom: 8px;
}

.map-box {
    background: var(--color-white);
    min-height: 330px;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 35px;
    border: 1px solid rgba(21,122,61,0.08);
}

.map-box span {
    font-size: 50px;
    display: block;
    margin-bottom: 10px;
}

.map-box h3 {
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}

.map-box p {
    color: var(--color-muted);
}

/* =========================================================
   26. CTA
========================================================= */
.cta-section {
    background:
        linear-gradient(135deg, rgba(15,107,53,0.95), rgba(35,166,91,0.92)),
        url("https://images.unsplash.com/photo-1466692476868-aef1dfb1e735?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.cta-box {
    background: rgba(255,255,255,0.96);
    border-radius: 30px;
    padding: 42px;
    box-shadow: var(--shadow-strong);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
}

.cta-box h2 {
    color: var(--color-primary-dark);
    font-size: 32px;
    margin-bottom: 10px;
}

.cta-box p {
    color: #304333;
}

.cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   27. MENSAJE TEMPORAL JS
========================================================= */
.mensaje-temporal {
    position: fixed;
    right: 25px;
    bottom: 25px;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: var(--shadow-medium);
    transform: translateY(25px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 3000;
}

.mensaje-temporal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =========================================================
   28. FOOTER INSTITUCIONAL
========================================================= */
.footer {
    background:
        radial-gradient(circle at 10% 20%, rgba(35,166,91,0.16), transparent 28%),
        linear-gradient(135deg, #0b1c12, #102719);
    color: var(--color-white);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 38px;
}

.footer-column h4 {
    color: var(--color-white);
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-column p {
    color: #d8e6dc;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-column ul {
    list-style: none;
    padding-left: 0;
}

.footer-column li {
    margin-bottom: 9px;
    color: #d8e6dc;
    font-size: 14px;
}

.footer-column a {
    color: #d8e6dc;
}

.footer-column a:hover {
    color: var(--color-primary-light);
    padding-left: 4px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.footer-logo span {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo h3 {
    color: var(--color-white);
    font-size: 24px;
}

.footer-logo small {
    color: #b8d8c3;
}

.footer-bottom {
    margin-top: 45px;
    background: rgba(0,0,0,0.22);
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
    color: #d8e6dc;
    font-size: 14px;
}

.developers {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}

.developers strong {
    color: var(--color-white);
}

/* =========================================================
   29. BOTÓN VOLVER ARRIBA
========================================================= */
.btn-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 23px;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: var(--transition);
    z-index: 2500;
}

.btn-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
}

/* =========================================================
   30. PANEL ADMINISTRATIVO
========================================================= */
.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 285px 1fr;
    background: #eef7f0;
}

.admin-sidebar {
    background:
        radial-gradient(circle at 20% 20%, rgba(35,166,91,0.18), transparent 30%),
        linear-gradient(180deg, #0b1c12, #102719);
    color: var(--color-white);
    padding: 26px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.admin-brand span {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.12);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.admin-brand h2 {
    font-size: 23px;
    line-height: 1;
}

.admin-brand small {
    color: #b8d8c3;
    font-size: 12px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.admin-menu a {
    color: #d8e6dc;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: bold;
    transition: var(--transition);
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255,255,255,0.12);
    color: var(--color-white);
    padding-left: 18px;
}

.logout-admin {
    background: rgba(192,57,43,0.22);
    color: #ffd6d2 !important;
}

.admin-main {
    padding: 32px;
    overflow-x: hidden;
}

.admin-header {
    background: var(--color-white);
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 28px;
}

.admin-header h1 {
    color: var(--color-primary-dark);
    font-size: 34px;
    margin-bottom: 6px;
}

.admin-header p {
    color: var(--color-muted);
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-secondary);
    padding: 14px 18px;
    border-radius: 18px;
    min-width: 220px;
}

.admin-user-card span {
    width: 45px;
    height: 45px;
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-user-card strong {
    color: var(--color-primary-dark);
    display: block;
}

.admin-user-card small {
    color: var(--color-muted);
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.admin-card {
    background: var(--color-white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
    transition: var(--transition);
}

.admin-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.admin-card span {
    width: 55px;
    height: 55px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 15px;
}

.admin-card h3 {
    color: var(--color-primary-dark);
    margin-bottom: 6px;
}

.admin-card strong {
    display: block;
    font-size: 30px;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.admin-card p {
    color: var(--color-muted);
    font-size: 14px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    margin-bottom: 28px;
}

.admin-panel-box {
    background: var(--color-white);
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(21,122,61,0.08);
}

.admin-panel-box h2 {
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.admin-panel-box p {
    color: var(--color-muted);
    margin-bottom: 14px;
}

.system-status-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.system-status-list div {
    display: grid;
    grid-template-columns: auto 160px 1fr;
    gap: 10px;
    align-items: center;
    background: #f7fbf8;
    padding: 14px;
    border-radius: 15px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.pending {
    background: var(--color-warning);
    box-shadow: 0 0 0 5px rgba(243,156,18,0.14);
}

.status-dot.online {
    background: var(--color-primary);
    box-shadow: 0 0 0 5px rgba(21,122,61,0.14);
}

.status-dot.offline {
    background: var(--color-danger);
    box-shadow: 0 0 0 5px rgba(192,57,43,0.14);
}

.quick-control {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-control button {
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 13px;
    border-radius: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.quick-control button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.quick-control .danger {
    background: var(--color-danger);
}

.quick-control .danger:hover {
    background: #9f2f24;
}

.admin-timeline {
    margin-top: 20px;
}

/* =========================================================
   31. ANIMACIONES
========================================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeZoom {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden-animation {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.show-animation {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   32. RESPONSIVE - LAPTOP
========================================================= */
@media (max-width: 1200px) {
    .nav {
        gap: 13px;
    }
    .nav a {
        font-size: 13px;
    }
    .admin-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .timeline {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================================
   33. RESPONSIVE - TABLET
========================================================= */
@media (max-width: 992px) {
    .header-top-content {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    .header-main {
        min-height: 84px;
    }
    .nav {
        display: none;
        position: absolute;
        top: 124px;
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 5%;
        box-shadow: var(--shadow-medium);
        border-top: 1px solid var(--color-border);
    }
    .nav.active {
        display: flex;
    }
    .nav a {
        width: 100%;
        padding: 12px 0;
    }
    .menu-btn {
        display: block;
    }
    .login-panel {
        right: 5%;
        top: 134px;
    }
    .hero {
        padding: 80px 0 70px;
    }
    .hero-content,
    .grid-2,
    .cta-box {
        grid-template-columns: 1fr;
    }
    .hero h2 {
        font-size: 42px;
    }
    .hero-image img,
    .hero img {
        height: 380px;
    }
    .floating-card {
        left: 20px;
        bottom: 20px;
    }
    .cards,
    .cards-2,
    .cards-3,
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    .component-item {
        grid-template-columns: 1fr;
    }
    .component-item img {
        height: 330px;
    }
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    .developers {
        text-align: center;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: relative;
        height: auto;
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   34. RESPONSIVE - CELULAR
========================================================= */
@media (max-width: 768px) {
    .container {
        width: 92%;
    }
    .header-top-bar {
        font-size: 12px;
    }
    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 25px;
    }
    .logo-text h1 {
        font-size: 23px;
    }
    .logo-text small {
        font-size: 11px;
    }
    .login-toggle,
    .panel-shortcut {
        padding: 9px 13px;
        font-size: 13px;
    }
    .nav {
        top: 122px;
    }
    .login-panel {
        width: 92%;
        right: 4%;
        top: 130px;
    }
    .hero {
        padding: 60px 0 65px;
    }
    .hero h2 {
        font-size: 34px;
    }
    .hero p,
    .section-description {
        font-size: 16px;
    }
    .hero-image img,
    .hero img,
    .img-rounded {
        height: 280px;
    }
    .floating-card {
        position: static;
        width: 100%;
        margin-top: 16px;
    }
    .hero-stats,
    .stats-center,
    .cards,
    .cards-2,
    .cards-3,
    .footer-content,
    .admin-summary,
    .timeline {
        grid-template-columns: 1fr;
    }
    .page-header {
        padding: 80px 18px;
    }
    .page-header h2 {
        font-size: 32px;
    }
    .title {
        font-size: 29px;
    }
    .grid-2 h2 {
        font-size: 28px;
    }
    .section {
        padding: 65px 0;
    }
    .component-item {
        padding: 20px;
    }
    .component-item img {
        height: 240px;
    }
    .component-item h3 {
        font-size: 22px;
    }
    .image-note {
        position: static;
        margin-top: 14px;
        max-width: 100%;
    }
    .flow {
        flex-direction: column;
    }
    .flow span {
        transform: rotate(90deg);
    }
    .cta-box {
        padding: 28px;
    }
    .cta-actions {
        flex-direction: column;
    }
    .btn,
    .btn-outline,
    .btn-danger {
        width: 100%;
        text-align: center;
    }
    .footer {
        padding-top: 45px;
    }
    .admin-main {
        padding: 20px;
    }
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-header h1 {
        font-size: 28px;
    }
    .admin-user-card {
        width: 100%;
    }
    .quick-control {
        grid-template-columns: 1fr;
    }
    .system-status-list div {
        grid-template-columns: 1fr;
    }
    .mensaje-temporal {
        right: 4%;
        left: 4%;
        bottom: 20px;
    }
}

/* =========================================================
   35. RESPONSIVE - CELULARES PEQUEÑOS
========================================================= */
@media (max-width: 480px) {
    .header-main {
        gap: 10px;
    }
    .header-actions {
        gap: 6px;
    }
    .login-toggle {
        display: none;
    }
    .hero h2 {
        font-size: 30px;
    }
    .card,
    .component-item,
    .contact-box,
    .admin-panel-box,
    .admin-card {
        border-radius: 18px;
    }
    .card img {
        height: 190px;
    }
    .footer-bottom-content {
        font-size: 13px;
    }
}


/* =========================================================
   36. CORRECCIÓN PANEL ARDUINO - ESTADO Y FECHA
   Mantiene el diseño admin-card sin afectar iconos principales
========================================================= */

.admin-card p span {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    color: var(--color-muted) !important;
    display: inline !important;
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.admin-card p .estado {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.admin-card p .estado.funcionando {
    background: #d9f8e5 !important;
    color: #087536 !important;
}

.admin-card p .estado.detenido {
    background: #eeeeee !important;
    color: #666666 !important;
}

.admin-card p .estado.leyendo {
    background: #fff3cd !important;
    color: #8a6500 !important;
}

.admin-card p .estado.error {
    background: #ffd6d1 !important;
    color: #b3261e !important;
}

.admin-card .sensor-meta {
    margin-top: 8px;
}

.admin-card .sensor-meta p {
    margin-bottom: 5px;
}

.sensor-control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.sensor-control-row button {
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.sensor-control-row button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.sensor-control-row button.danger {
    background: var(--color-danger);
}

.sensor-control-row button.danger:hover {
    background: #9f2f24;
}
