/* Rotary Brand Colors */
:root {
  --rotary-royal-blue: #18325C;
  --rotary-azure: #019FCB;
  --rotary-gold: #F7A81B;
  --rotary-cranberry: #D91B5C;
  --rotary-teal: #18B0B0;
  --rotary-purple: #872175;
  --rotary-green: #18825C;
  --rotary-white: #FFFFFF;
  --rotary-light-gray: #F4F4F4;
  --rotary-dark-gray: #333333;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--rotary-dark-gray);
  background: var(--rotary-white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-gold { background: var(--rotary-gold); color: var(--rotary-royal-blue); }
.btn-blue { background: var(--rotary-royal-blue); color: var(--rotary-white); }
.btn-azure { background: var(--rotary-azure); color: var(--rotary-white); }

/* Section headings */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--rotary-gold);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ========================
   HEADER
======================== */
.site-header {
  background: var(--rotary-royal-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo img {
  height: 52px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
  background: white;
}

.logo-text {
  color: var(--rotary-white);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.logo-text span {
  color: var(--rotary-gold);
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Hamburger (mobile CSS-only) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 36px;
  height: 28px;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--rotary-white);
  border-radius: 2px;
  position: relative;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}

.nav-toggle-label span::before { top: -9px; }
.nav-toggle-label span::after { top: 9px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  color: var(--rotary-white);
  background: rgba(255,255,255,0.1);
}

.main-nav .btn-members {
  background: var(--rotary-gold);
  color: var(--rotary-royal-blue);
  font-weight: 700;
  padding: 0.5rem 1.25rem;
}

.main-nav .btn-members:hover {
  background: #e59710;
  color: var(--rotary-royal-blue);
}

/* ========================
   HERO
======================== */
.hero {
  background: linear-gradient(135deg, var(--rotary-royal-blue) 0%, #0a1f3f 60%, #012244 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: var(--rotary-gold);
  color: var(--rotary-royal-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--rotary-white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-motto {
  font-size: 0.9rem;
  color: var(--rotary-gold);
  font-style: italic;
  margin-top: 1.5rem;
  letter-spacing: 0.02em;
}

/* ========================
   ÁREAS DE INTERÉS
======================== */
.section-areas-foco {
  background: var(--rotary-white);
  padding: 4rem 0;
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

.area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.area-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.area-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--area-color, var(--rotary-royal-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: white;
}

.area-icon svg {
  width: 36px;
  height: 36px;
  fill: white;
}

.area-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  line-height: 1.3;
}

/* ========================
   EVENTOS
======================== */
.section-eventos {
  background: var(--rotary-light-gray);
  padding: 4rem 0;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.event-card {
  background: var(--rotary-white);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--rotary-azure);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--rotary-royal-blue);
  color: var(--rotary-white);
  border-radius: 8px;
  min-width: 56px;
  padding: 0.5rem;
  text-align: center;
  flex-shrink: 0;
}

.event-day {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.event-month {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rotary-gold);
}

.event-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.event-info p {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.6rem;
}

.event-location {
  font-size: 0.8rem;
  color: var(--rotary-azure);
  font-weight: 600;
}

/* ========================
   NOTICIAS
======================== */
.section-noticias {
  background: var(--rotary-white);
  padding: 4rem 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--rotary-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #eee;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.news-image-placeholder {
  background: linear-gradient(135deg, var(--rotary-royal-blue) 0%, var(--rotary-azure) 100%);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 2.5rem;
}

.news-content {
  padding: 1.25rem;
}

.news-content time {
  font-size: 0.78rem;
  color: var(--rotary-azure);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  margin: 0.5rem 0;
  line-height: 1.35;
}

.news-content p {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.55;
}

/* ========================
   FOOTER
======================== */
.site-footer {
  background: var(--rotary-royal-blue);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--rotary-gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--rotary-gold); }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 44px;
  border-radius: 4px;
  background: white;
  padding: 2px;
}

.footer-logo span {
  font-weight: 700;
  color: var(--rotary-white);
  font-size: 0.95rem;
  line-height: 1.3;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ========================
   LOGIN PAGE
======================== */
.login-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rotary-light-gray);
  padding: 2rem 1rem;
}

.login-card {
  background: var(--rotary-white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-card .login-logo img {
  height: 72px;
  margin: 0 auto 0.75rem;
  border-radius: 6px;
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rotary-royal-blue);
  text-align: center;
  margin-bottom: 0.35rem;
}

.login-card .login-subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rotary-dark-gray);
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--rotary-azure);
  box-shadow: 0 0 0 3px rgba(1,159,203,0.12);
}

.btn-login {
  width: 100%;
  padding: 0.85rem;
  background: var(--rotary-gold);
  color: var(--rotary-royal-blue);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}

.btn-login:hover { background: #e59710; transform: translateY(-1px); }

.login-error {
  background: #fff0f3;
  color: var(--rotary-cranberry);
  border: 1px solid #f8b4c4;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.login-back {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.login-back a {
  color: var(--rotary-azure);
  font-weight: 600;
}

.login-back a:hover { text-decoration: underline; }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
  .areas-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle-label {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rotary-royal-blue);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-toggle:checked ~ .main-nav {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .main-nav .btn-members {
    margin: 0.5rem 1.5rem;
    border-radius: 4px;
    text-align: center;
  }

  .hero { min-height: 380px; padding: 3rem 1.5rem; }
  .hero h1 { font-size: 1.75rem; }

  .events-grid,
  .news-grid { grid-template-columns: 1fr; }

  .areas-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .section-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .area-card h3 { font-size: 0.75rem; }
}
