/* ============================================
   PORTAL TIRMA — Design System (global.css)
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Phosphor Icons — Elegant, consistent icon set */
@import url('https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css');

/* Icon helpers */
.ph { vertical-align: -0.125em; }
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.25rem; }
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 2rem; }
.icon-2xl { font-size: 2.5rem; }

:root {
  /* — Brand Colors (from logo) — */
  --color-green-dark:   #2B3414;
  --color-green-mid:    #4a5a22;
  --color-green-accent: #91B13A;
  --color-green-light:  #D9E6BB;
  --color-green-pale:   #EEF4DC;
  --color-gold:         #D4B429;
  --color-cranberry:    #6C1F45;

  /* — Neutrals — */
  --color-bg:           #F9FBF4;
  --color-surface:      #FFFFFF;
  --color-surface-alt:  #F5F7F0;
  --color-border:       #E2E8D4;
  --color-border-focus: #91B13A;
  --color-text:         #2B3414;
  --color-text-secondary: #5A6547;
  --color-text-muted:   #8A9477;
  --color-error:        #D9534F;
  --color-error-bg:     #FDF0F0;

  /* — Typography — */
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:  'Playfair Display', Georgia, serif;

  /* — Spacing — */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* — Radius — */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* — Shadows — */
  --shadow-sm:  0 1px 3px rgba(43,52,20,0.06);
  --shadow-md:  0 4px 12px rgba(43,52,20,0.08);
  --shadow-lg:  0 8px 24px rgba(43,52,20,0.10);
  --shadow-xl:  0 12px 40px rgba(43,52,20,0.12);

  /* — Transitions — */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ====== RESET & BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-green-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-green-dark); }

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-green-dark); line-height: 1.25; }

h1 { font-size: 2rem; font-weight: 600; margin-bottom: var(--space-lg); }
h2 { font-size: 1.6rem; font-weight: 600; margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: var(--space-sm); }

/* ====== LAYOUT ====== */
.page-wrapper { max-width: 900px; margin: 0 auto; padding: var(--space-lg); }

/* ====== HEADER / NAVBAR ====== */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-sm) var(--space-xl);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
}

.site-header .logo-img { height: 50px; width: auto; }

.header-right { display: flex; align-items: center; gap: var(--space-md); }
.main-nav { display: flex; gap: var(--space-sm); align-items: center; }

.main-nav a {
  font-family: var(--font-body); font-weight: 500; font-size: 0.9rem;
  color: var(--color-text-secondary); padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm); transition: all var(--transition-base);
  text-decoration: none;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--color-green-dark); background: var(--color-green-pale);
}

/* Nav Dropdown (Generic) */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-toggle {
    display: flex; align-items: center; gap: var(--space-xs);
    font-family: var(--font-body); font-weight: 500; font-size: 0.9rem;
    color: var(--color-text-secondary); padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm); transition: all var(--transition-base);
    cursor: pointer; text-decoration: none; border: none; background: none;
}
.nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--color-green-dark); background: var(--color-green-pale);
}
.nav-dropdown .dropdown-menu {
    right: auto; left: 0; min-width: 200px;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown::after {
    content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 12px;
}

/* User Menu */
.user-menu { position: relative; }
/* Invisible bridge to prevent hover loss */
.user-menu::after {
  content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 12px;
}

.user-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 2px solid var(--color-green-accent); overflow: hidden; cursor: pointer;
  transition: box-shadow var(--transition-fast);
}
.user-avatar:hover { box-shadow: 0 0 0 3px rgba(145,177,58,0.25); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--color-surface); min-width: 180px;
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
}
.user-menu:hover .dropdown-menu { display: block; }

.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: var(--space-sm);
  width: 100%; padding: var(--space-md); border: none; background: none;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--color-text);
  cursor: pointer; text-decoration: none; transition: background var(--transition-fast);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--color-green-pale); }
.dropdown-menu .divider { height: 1px; background: var(--color-border); margin: 0; }

/* ====== CARDS ====== */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-centered {
  max-width: 480px; margin: var(--space-3xl) auto; text-align: center;
}

/* ====== FORMS ====== */
label {
  display: block; font-weight: 500; font-size: 0.85rem;
  color: var(--color-text-secondary); margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

input[type="text"], input[type="password"], input[type="email"],
input[type="tel"], input[type="date"], input[type="number"],
select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--color-text); background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: var(--space-md);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-green-accent);
  box-shadow: 0 0 0 3px rgba(145,177,58,0.15);
}
input[readonly] {
  background: var(--color-surface-alt); color: var(--color-text-muted);
  cursor: default;
}
textarea { min-height: 80px; resize: vertical; }

/* Password container */
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.toggle-password {
  position: absolute; right: 12px; top: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 1.1rem;
  transition: color var(--transition-fast); line-height: 1;
}
.toggle-password:hover { color: var(--color-green-dark); }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 12px 24px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition-base); text-decoration: none;
}
.btn-primary {
  background: var(--color-green-dark); color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--color-green-mid); transform: translateY(-1px); box-shadow: var(--shadow-md); color:#fff; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-accent {
  background: var(--color-green-accent); color: var(--color-green-dark);
}
.btn-accent:hover { background: #7d9a2e; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--color-green-dark);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-green-accent); background: var(--color-green-pale); }

.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover { background: #c0392b; }

.btn-block { width: 100%; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* Legacy submit button override */
input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition-base);
  background: var(--color-green-dark); color: #fff;
}
input[type="submit"]:hover { background: var(--color-green-mid); transform: translateY(-1px); }

/* ====== ALERTS / ERROR BOX ====== */
.alert {
  padding: var(--space-md); border-radius: var(--radius-sm);
  margin-bottom: var(--space-md); font-size: 0.9rem; line-height: 1.5;
}
.alert-error {
  background: var(--color-error-bg); color: var(--color-error);
  border: 1px solid rgba(217,83,79,0.2);
}
.alert-success {
  background: rgba(145,177,58,0.1); color: var(--color-green-dark);
  border: 1px solid rgba(145,177,58,0.25);
}

/* ====== PROFILE CARD ====== */
.profile-card {
  display: flex; align-items: center; gap: var(--space-xl);
  max-width: 600px; margin: 0 auto;
}
.profile-avatar {
  width: 140px; height: 140px; border-radius: var(--radius-full);
  border: 3px solid var(--color-green-accent); overflow: hidden; flex-shrink: 0;
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar .avatar-icon { font-size: 3.5rem; color: var(--color-text-muted); }

.profile-info { flex: 1; }

@media (max-width: 600px) {
  .profile-card { flex-direction: column; text-align: center; }
}

/* ====== SECTION TITLES ====== */
.section-heading {
  display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600;
  color: var(--color-green-dark);
  padding-bottom: var(--space-sm); margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-green-pale);
}

/* ====== GRID ====== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-grid .full-width { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ====== UPLOAD AREA ====== */
.upload-area {
  border: 2px dashed var(--color-border); padding: var(--space-xl);
  text-align: center; border-radius: var(--radius-md);
  background: var(--color-surface-alt); cursor: pointer;
  transition: all var(--transition-base);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px;
}
.upload-area:hover { border-color: var(--color-green-accent); background: var(--color-green-pale); }
.upload-area .upload-text { font-weight: 500; color: var(--color-text-secondary); }

.preview-container img {
  width: 110px; height: 140px; object-fit: cover;
  border-radius: var(--radius-sm); border: 2px solid var(--color-green-accent);
  display: block; margin: var(--space-sm) auto 0;
}

/* ====== PRICE TAG ====== */
.price-tag {
  background: var(--color-surface-alt); padding: var(--space-md);
  border-radius: var(--radius-sm); text-align: right;
  margin-top: var(--space-md); font-weight: 600; color: var(--color-green-dark);
  border-left: 3px solid var(--color-green-accent);
}

/* ====== TOTAL BOX ====== */
.total-box {
  background: var(--color-green-dark); color: #fff;
  padding: var(--space-xl); border-radius: var(--radius-lg);
  text-align: right; margin-top: var(--space-xl); font-size: 1.1rem;
}
.total-box .total-amount { font-size: 2.8rem; font-weight: 700; font-family: var(--font-heading); }

/* ====== CARNET ITEM ====== */
.carnet-item {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  margin-bottom: var(--space-lg); transition: box-shadow var(--transition-base);
}
.carnet-item:hover { box-shadow: var(--shadow-md); }
.carnet-item.paid { border-color: var(--color-green-accent); }

.carnet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: var(--space-sm); margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.btn-remove {
  background: none; border: none; color: var(--color-error);
  font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm); transition: background var(--transition-fast);
  line-height: 1;
}
.btn-remove:hover { background: var(--color-error-bg); }

/* ====== RESUMEN ITEM ====== */
.resumen-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); margin-bottom: var(--space-md);
  border-left: 4px solid var(--color-green-accent);
}
.resumen-item .foto-resumen {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  object-fit: cover; border: 1px solid var(--color-border);
}

/* ====== CREDIT CARD (Payment) ====== */
.credit-card {
  background: linear-gradient(135deg, var(--color-green-dark) 0%, var(--color-green-mid) 100%);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  color: #fff; box-shadow: var(--shadow-xl); margin-bottom: var(--space-xl);
  position: relative; height: 210px;
}
.card-chip { width: 48px; height: 36px; background: var(--color-gold); border-radius: 4px; margin-bottom: var(--space-lg); }
.card-number { font-size: 1.3rem; letter-spacing: 3px; font-family: 'Courier New', monospace; margin-bottom: var(--space-md); }
.card-holder { font-size: 0.85rem; text-transform: uppercase; opacity: 0.8; }
.mastercard-logo { position: absolute; bottom: 24px; right: 24px; display: flex; }
.circle { width: 32px; height: 32px; border-radius: 50%; }
.red { background: #eb001b; }
.orange { background: #ff5f00; margin-left: -12px; opacity: 0.8; }

/* ====== INFO BOX ====== */
.info-box {
  background: var(--color-surface-alt); border-left: 3px solid var(--color-green-accent);
  padding: var(--space-md); margin: var(--space-sm) 0 var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.5;
}

/* ====== FOOTER ====== */
.site-footer {
  margin-top: var(--space-3xl); padding: var(--space-xl) var(--space-xl);
  border-top: 1px solid var(--color-border); color: var(--color-text-muted);
  font-size: 0.8rem; line-height: 1.7;
}
.footer-grid {
  max-width: 800px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xl);
}
.footer-grid strong { color: var(--color-green-dark); font-size: 0.85rem; }

/* ====== AUTH PAGES (Login/Register) ====== */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--space-xl);
  padding-bottom: 10vh;
}
.auth-page .logo-img { width: 100px; margin-bottom: var(--space-xl); }
.auth-page h1 { text-align: center; margin-bottom: var(--space-lg); }

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

.auth-links { text-align: center; margin-top: var(--space-md); }
.auth-links a {
  display: inline-block; margin: var(--space-xs) 0;
  font-size: 0.9rem; color: var(--color-text-secondary);
}
.auth-links a:hover { color: var(--color-green-accent); }

/* ====== FLEX UTILITIES ====== */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-gap { gap: var(--space-md); }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ====== VERIFICATION CODE INPUT ====== */
.input-code {
  font-size: 1.8rem; text-align: center; letter-spacing: 10px;
  font-weight: 700; color: var(--color-green-dark);
  height: 60px; border: 2px solid var(--color-green-accent);
}

/* ====== HAMBURGER BUTTON (hidden on desktop) ====== */
.hamburger-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.hamburger-btn:hover { background: var(--color-green-pale); }
.hamburger-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--color-green-dark); border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
/* Animación a X cuando está abierto */
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====== MOBILE DRAWER ====== */
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 998;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s;
}
.mobile-overlay.active { display: block; }

.mobile-drawer {
  position: fixed; top: 0; right: -320px; height: 100%;
  width: 300px; max-width: 85vw;
  background: var(--color-surface);
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  z-index: 999; transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-drawer.open { right: 0; }

.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-surface); z-index: 1;
}
.mobile-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-secondary); font-size: 1.3rem;
  padding: 4px; border-radius: var(--radius-sm);
  display: flex; align-items: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.mobile-drawer-close:hover { color: var(--color-green-dark); background: var(--color-green-pale); }

.mobile-nav {
  display: flex; flex-direction: column; padding: 12px 0; flex: 1;
}
.mobile-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; font-size: 0.95rem; font-weight: 500;
  color: var(--color-text); text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--color-green-pale); color: var(--color-green-dark);
}
.mobile-nav-group {
  margin: 8px 0;
}
.mobile-nav-group-title {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--color-text-secondary);
}
.mobile-nav-group a { padding-left: 48px; font-size: 0.9rem; }
.mobile-nav-divider { height: 1px; background: var(--color-border); margin: 8px 0; }
.mobile-nav-logout {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 24px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  color: #dc2626; text-align: left;
  transition: background var(--transition-fast);
}
.mobile-nav-logout:hover { background: rgba(220,38,38,0.07); }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .site-header { padding: var(--space-sm) var(--space-md); }
  .header-right { display: none; }   /* Ocultar nav/weather/avatar en móvil */
  .hamburger-btn { display: flex; }  /* Mostrar hamburguesa en móvil */
  h1 { font-size: 1.6rem; }
  .card { padding: var(--space-lg); }
  .auth-card { padding: var(--space-lg); }
  .page-wrapper { padding: var(--space-md); }
  .footer-grid { flex-direction: column; gap: var(--space-md); }
}

/* ====== RADIO & CHECKBOX ====== */
.radio-group { display: flex; gap: var(--space-lg); margin-bottom: var(--space-md); }
.radio-group label {
  display: flex; align-items: center; gap: var(--space-xs);
  font-weight: 400; font-size: 0.95rem; color: var(--color-text); cursor: pointer;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--color-green-accent); }

/* ====== COUNTER ====== */
.counter-control {
  display: flex; align-items: center; gap: var(--space-md);
  margin-top: var(--space-sm);
}
.counter-control button {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border); background: var(--color-surface);
  font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast); color: var(--color-green-dark);
}
.counter-control button:hover { border-color: var(--color-green-accent); background: var(--color-green-pale); }
.counter-control input {
  width: 50px; text-align: center; font-weight: 600; margin-bottom: 0;
}

/* ====== WEATHER MODAL ====== */
.weather-card-inner {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    color: white;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 350px;
    max-width: 450px;
}
.weather-card-inner::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
}
.weather-main {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-bottom: var(--space-md); position: relative; z-index: 1;
}
.weather-temp { font-size: 4rem; font-weight: 800; line-height: 1; }
.weather-icon { font-size: 4.5rem; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)); }
.weather-details {
    display: flex; justify-content: center; gap: 20px; font-size: 1rem;
    font-weight: 500; background: rgba(0, 0, 0, 0.1); padding: 10px;
    border-radius: 30px; margin-bottom: 15px; position: relative; z-index: 1;
}
.aqi-badge {
    display: inline-block; padding: 6px 15px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 700; color: white; text-transform: uppercase;
    letter-spacing: 1px; position: relative; z-index: 1; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.aqi-good { background-color: #4CAF50; }
.aqi-moderate { background-color: #FFC107; color: #333; }
.aqi-bad { background-color: #F44336; }

.forecast-container {
    display: flex; justify-content: space-between; margin-top: 20px;
    padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative; z-index: 1;
}
.forecast-item { display: flex; flex-direction: column; align-items: center; font-size: 0.85rem; gap: 5px; }
.forecast-icon { font-size: 1.5rem; margin: 5px 0; }

/* ====== MODAL (IMAGES & WEATHER) ====== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
    backdrop-filter: blur(5px);
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border-radius: var(--radius-sm);
}

@keyframes zoomIn {
    from {transform:scale(0.95); opacity:0;} 
    to {transform:scale(1); opacity:1;}
}

.anuncio-img-click {
    cursor: zoom-in;
    transition: transform var(--transition-fast);
}
.anuncio-img-click:hover {
    transform: scale(1.02);
}

