/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: #0066cc;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.top-bar {
  background-color: #1a3a5c;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sede-title {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.identificate {
  color: #fff;
  font-size: 14px;
}

.identificate:hover {
  text-decoration: underline;
}

/* Hero Banner */
.hero-banner {
  background-image: url('fondoCabecera.jpg');
  background-size: cover;
  background-position: center 30%;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 58, 92, 0.85) 0%, rgba(62, 113, 154, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 20px 40px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  height: 90px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  color: white;
}

.logo-title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

/* Main Navigation */
.main-nav {
  background-color: #fff;
  border-bottom: 3px solid #0066cc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 16px 20px;
  color: #333;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-item.active > a {
  color: #0066cc;
  border-bottom: 3px solid #0066cc;
  margin-bottom: -3px;
}

.nav-item > a:hover {
  color: #0066cc;
  text-decoration: none;
}

.arrow {
  font-size: 10px;
  margin-left: 4px;
}

.language-selector {
  margin-left: auto;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 4px 4px;
  z-index: 100;
  display: none;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 12px 20px;
  color: #333;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.dropdown li:last-child a {
  border-bottom: none;
}

.dropdown li a:hover {
  background-color: #f5f5f5;
  color: #0066cc;
  text-decoration: none;
}

/* Main Content */
.main-content {
  padding: 20px 0 40px;
}

/* Date Time */
.date-time {
  text-align: right;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* Main Cards */
.main-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.card-link {
  text-decoration: none;
}

.main-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.main-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}

.card-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 50px;
  height: 50px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #0066cc;
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

/* Section Titles */
.section-title {
  font-size: 24px;
  font-weight: 400;
  color: #333;
  margin-bottom: 20px;
}

/* Trámites Box */
.tramites-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 25px 30px;
}

.tramites-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
}

.tramites-destacados li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.star {
  color: #0066cc;
  font-size: 12px;
}

.tramites-destacados a {
  font-size: 14px;
  line-height: 1.4;
}

.divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

.tramites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tramites-col ul li {
  margin-bottom: 12px;
}

.tramites-col ul li a {
  font-size: 14px;
  color: #0066cc;
}

/* Service Box */
.service-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 25px;
  margin-bottom: 30px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.servicios-online {
  grid-template-columns: repeat(3, 1fr);
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.service-item:hover {
  background-color: #f5f5f5;
  text-decoration: none;
}

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066cc;
}

.service-icon svg {
  width: 32px;
  height: 32px;
  stroke: #0066cc;
}

.service-item span {
  font-size: 13px;
  color: #0066cc;
  line-height: 1.3;
}

/* Tablón de Anuncios */
.tablon-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plus-link {
  font-size: 28px;
  font-weight: 300;
  color: #666;
  margin-left: 10px;
}

.plus-link:hover {
  color: #0066cc;
  text-decoration: none;
}

.tablon-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.anuncios-list {
  margin-bottom: 20px;
}

.anuncio-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.anuncio-item:last-child {
  border-bottom: none;
}

.anuncio-date {
  background: #0066cc;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.anuncio-date .month {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.anuncio-date .day {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.anuncio-content {
  flex: 1;
}

.anuncio-title {
  font-size: 14px;
  font-weight: 600;
  color: #0066cc;
  display: block;
  margin-bottom: 5px;
}

.anuncio-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.btn-mas-publicaciones {
  display: inline-block;
  background: #0066cc;
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-mas-publicaciones:hover {
  background: #0055aa;
  text-decoration: none;
}

/* Enlaces de Interés */
.enlaces-interes {
  margin-top: 40px;
}

.section-divider {
  border: none;
  border-top: 2px solid #0066cc;
  margin-bottom: 30px;
}

.enlaces-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.enlace-col h3 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.4;
}

.enlace-col ul li {
  margin-bottom: 10px;
}

.enlace-col ul li a {
  font-size: 14px;
  color: #0066cc;
}

/* Footer */
.main-footer {
  background: #e8e8e8;
  padding: 40px 0;
  margin-top: 40px;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #0066cc;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.help-icon {
  width: 30px;
  height: 30px;
  background: #0066cc;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.footer-contact p {
  font-size: 14px;
  color: #333;
}

.footer-contact a {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .enlaces-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-cards {
    grid-template-columns: 1fr;
  }

  .nav-list {
    flex-wrap: wrap;
  }

  .nav-item > a {
    padding: 12px 15px;
    font-size: 14px;
  }

  .tramites-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .enlaces-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    height: 140px;
  }

  .logo {
    height: 70px;
  }
}
