* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Top Bar */
.top-bar {
    background-color: #52565f;
    /* Gris oscuro tipo carbón según la imagen */
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-right i {
    margin-right: 5px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: white;
    text-decoration: none;
}

/* Header/Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
}

.bienvenida img {
    width: 50%;
    height: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #2c7a9f;
    /* Color azul institucional para los links */
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: #1a5a7a;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-menu .active {
    background-color: #2c7a9f;
    color: white !important;
    padding: 12px 20px;
    border-radius: 0;
    /* Rectangular como en la imagen */
}

/* Submenu / Dropdown Styles */
.nav-menu li {
    position: relative;
    /* Base para el posicionamiento del submenu */
}

.submenu {
    position: absolute;
    top: 100%;
    left: 40%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 15px 0;
    margin: 0;
    display: none;
    /* Oculto por defecto */
    z-index: 1000;
    border-top: 2px solid transparent;
    /* Espacio sutil */
}

.submenu li {
    width: 100%;
    padding: 0 20px;
}

.submenu li a {
    color: #2c7a9f !important;
    padding: 10px 0;
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    border-bottom: 1px solid transparent;
}

.submenu li a:hover {
    text-decoration: underline;
    background: transparent;
}

/* Show submenu on hover */
.has-submenu:hover .submenu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Mobile Menu Toggle Button (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #2c7a9f;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}


/* Top Banner */
.top-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('/static/images/banner_houses_aerial.png');
    background-size: cover;
    background-position: center;
    padding: 30px 0;
    text-align: center;
    border-bottom: 3px solid #ffee00;
}

.banner-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
}

.banner-link:hover {
    transform: scale(1.02);
}

.top-banner h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    color: #ffe600;
    text-decoration: underline;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.top-banner p {
    font-size: 1rem;
    margin: 8px 0 0;
    color: #ffee00;
    font-weight: 500;
}

/* Main Portal Layout */
.portal-container {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 20px;
}

.portal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Portal Hero Carousel (Left Column) */
.portal-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: flex-start;
    padding: 60px 50px;
    border-radius: 8px;
    color: white;
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.65));
}

.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 90%;
}

.agency-name {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 10px;
}

.welcome-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 30px;
    font-weight: 700;
}

.welcome-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #eee;
    text-align: justify;
}

/* Portal Sidebar (Right Column) */
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block {
    background-color: #f5faff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-block label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.search-input-group {
    display: flex;
    gap: 8px;
}

.search-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e1e8ed;
    background: white;
    border-radius: 100px;
    outline: none;
    font-size: 0.95rem;
}

.btn-search {
    background-color: #8bc34a;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: #7cb342;
}

.info-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pr-map {
    width: 85%;
    margin-bottom: 25px;
    opacity: 0.9;
}

.info-block p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #2c5282;
    text-align: left;
    margin: 0;
}

/* Conocenos Section */
.conocenos-section {
    padding: 60px 0;
    background: white;
}

.conocenos-flex {
    display: flex;
    align-items: center;
    gap: 50px;
}

.conocenos-image {
    flex: 1;
}

.conocenos-image img {
    width: 100%;
    border-radius: 10px;
}

.conocenos-content {
    flex: 1.5;
}

.conocenos-content h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #334e68;
    position: relative;
}

.conocenos-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #486581;
    text-align: justify;
}

/* Shared Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Products Section */
.products-section {
    padding: 80px 20px;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
}

.product-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

/* Maps Overlay Section (Satellite Map) */
.maps-overlay-section {
    background: linear-gradient(rgb(69 69 69 / 65%), rgb(51 51 51 / 65%)), url(/static/images/PuertoRico.png);
    color: white;
    padding: 100px 20px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.maps-overlay-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.maps-overlay-text h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 600;
}

.maps-overlay-text h2 {
    font-size: 42px;
    margin-bottom: 40px;
    line-height: 1.1;
    font-weight: 700;
}

.maps-overlay-description p {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}



/* News Overlay Section (River BG) */
.news-overlay-section {
    background: linear-gradient(rgb(0 0 0 / 65%), rgb(0 0 0 / 65%)), url(/static/images/rio.png);
    color: white;
    padding: 100px 20px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.news-overlay-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.news-overlay-text h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 600;
}

.news-overlay-text h2 {
    font-size: 42px;
    margin-bottom: 40px;
    line-height: 1.1;
    font-weight: 700;
}

.news-overlay-description p {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

.btn {
    display: inline-block;
    background-color: #2c7a9f;
    color: white;
    text-decoration: underline;
    text-underline-offset: 5px;
    padding: 15px 40px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #246584;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.outline-btn {
    background-color: transparent !important;
    border: 1px solid white !important;
    color: white !important;
    padding: 10px 30px !important;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

.outline-btn:hover {
    background-color: white !important;
    color: #333 !important;
}



/* Tool Section */
.tool-section {
    padding: 80px 20px;
    background-color: white;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.tool-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
}

.tool-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

.tool-image img {
    width: 100%;
    height: auto;
    border: 3px solid #ddd;
    border-radius: 5px;
}

/* Footer */
footer {
    background-color: #52565f;
    color: white;
    padding: 80px 20px 40px 20px;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 100px;
    margin-bottom: 60px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: #fff;
    text-transform: none;
}

.footer-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #eee;
    margin-bottom: 5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #eee;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffee00;
}

.footer-map {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: #ccc;
}

/* Accessibility Button */
.accessibility-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffa500;
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-size: 24px;
    z-index: 1000;
}

/* Page Hero Banner */
.page-hero {
    width: 100%;
    height: 250px;
    /* Más panorámico según la imagen */
    overflow: hidden;
    position: relative;
}

.page-hero-image {
    width: 100%;
    height: 100%;
}

.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Breadcrumb */
.breadcrumb-container {
    background-color: white;
    /* Cambiado a blanco para integrarse mejor */
    padding: 10px 0;
    border-bottom: none;
    text-align: center;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    /* Centrar breadcrumb */
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #666;
}

.breadcrumb a {
    color: #2c7a9f;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a i {
    color: #8d6e63;
    /* Color marrón/dorado para el ícono de casa */
}

.breadcrumb a:hover {
    color: #1a5a7a;
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #999;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* Content Page */
.content-page {
    padding: 60px 0;
    background-color: white;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 5rem;
    color: #999;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.page-title2 {
    font-size: 4rem;
    color: #999;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Recursos Adicionales Section */
.recursos-section {
    padding: 60px 0 80px 0;
    background-color: #f8f9fa;
}

.recursos-title {
    font-size: 2.5rem;
    color: #555;
    margin-bottom: 50px;
    font-weight: 600;
    text-align: left;
}

.recursos-grid {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.recurso-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 350px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.recurso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recurso-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.recurso-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.recurso-link {
    color: #2c7a9f;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    line-height: 1.5;
    display: block;
    padding: 25px 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.recurso-link:hover {
    background-color: #2c7a9f;
    color: white;
    text-decoration: none;
}

/* Decorative Waves */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

.waves-container svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.text-content {
    color: #444;
    line-height: 1.9;
}

.text-content p {
    margin-bottom: 25px;
    font-size: 1rem;
    text-align: justify;
}

.highlight-text {
    font-weight: 600;
    color: #333;
    margin-top: 35px;
    margin-bottom: 20px;
}

.function-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.function-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.function-list li:before {
    content: "•";
    position: absolute;
    left: 10px;
    color: #2c7a9f;
    font-size: 1.5rem;
    line-height: 1.2;
}


/* Responsive Design */
@media (max-width: 768px) {

    .two-column,
    .maps-content,
    .products-grid,
    .news-content,
    .tool-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
}

/* Interactive Map Cards */
.map-card {
    display: flex;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 320px;
}

.map-card-content {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.map-card-image {
    flex: 1;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #eee;
    overflow: hidden;
    padding: 10px;
}

.map-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.map-card-title {
    font-size: 1.75rem;
    color: #555;
    margin-bottom: 20px;
    font-weight: 600;
}

.map-card-description {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 30px;
    flex-grow: 1;
}

.btn-map {
    align-self: flex-start;
    background-color: #2c7a9f;
    color: white;
    padding: 12px 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    text-transform: uppercase;
    transition: background 0.3s;
    text-align: center;
}

.btn-map:hover {
    background-color: #1e5a7a;
}

@media (max-width: 900px) {
    .map-card {
        flex-direction: column;
    }

    .map-card-image {
        height: 250px;
        order: -1;
        border-left: none;
        border-bottom: 1px solid #eee;
    }
}

/* Contact Form Styles */
.contact-container {
    display: flex;
    gap: 60px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.contact-form-section {
    flex: 1.5;
}

.contact-info-section {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: #2c7a9f;
}

textarea.form-control {
    height: 180px;
    resize: none;
}

.btn-submit {
    background-color: #2c7a9f;
    color: white;
    border: none;
    padding: 15px 0;
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 10px;
    transition: background 0.3s;
    border-radius: 6px;
}

.btn-submit:hover {
    background-color: #1e5a7a;
}

.contact-info-section p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 25px;
}

.contact-info-section .agency-name {
    font-weight: 800;
    color: #2c7a9f;
    font-style: italic;
    display: block;
    margin-bottom: 5px;
}

.contact-info-section .email-link {
    color: #666;
    text-decoration: underline;
}

/* FEMA Section Styles */
.fema-section {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.fema-section.reverse {
    flex-direction: row-reverse;
}

.fema-section .text-part {
    flex: 1;
}

.fema-section .image-part {
    flex: 0.8;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fema-section .image-part img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-fema-center {
    display: block;
    width: 100%;
    background-color: #2c7a9f;
    color: white;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    margin-top: 50px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.btn-fema-center:hover {
    background-color: #1e5a7a;
}

/* Municipios Grid Styles */
.municipios-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px 100px;
    margin-top: 20px;
    justify-content: center;
}

.municipios-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.municipio-link {
    color: #666;
    text-decoration: underline;
    font-size: 0.95rem;
    line-height: 1.6;
}

.municipio-link:hover {
    color: #2c7a9f;
}

@media (max-width: 768px) {

    .contact-container,
    .fema-section,
    .fema-section.reverse {
        flex-direction: column;
        gap: 40px;
    }

    .municipios-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-justify {
    text-align: justify;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mt-50 {
    margin-top: 50px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-25 {
    margin-bottom: 25px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fs-0-9rem {
    font-size: 0.9rem;
}

.fs-1-4rem {
    font-size: 1.4rem;
}

.fs-2rem {
    font-size: 2rem;
}

.color-dark {
    color: #333;
}

.color-muted {
    color: #666;
}

.color-primary {
    color: #2c7a9f;
}

.btn-inline {
    background-color: #2c7a9f;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
    transition: background 0.3s;
}

.btn-inline:hover {
    background-color: #1e5a7a;
    color: white;
}

.pdf-icon-large {
    font-size: 6rem;
    color: #ff0000;
}

.recurso-card-mini {
    max-width: 300px;
    flex: 1;
}

.recurso-image-mini {
    background: white;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recurso-link-mini {
    padding: 20px;
    font-size: 0.9rem;
    text-decoration: underline;
}

.fs-0-7rem {
    font-size: 0.7rem;
}

/* Page Entrance Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Base state for animated elements to avoid flicker */
.content-hidden {
    opacity: 0;
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* News Styles */
.noticias-banner {
    background-color: #a5a5a5;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
}

.noticias-banner img {
    height: 180px;
    object-fit: contain;
}

.noticias-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.noticias-header {
    font-size: 3.5rem;
    color: #999;
    margin-bottom: 40px;
    font-weight: 700;
}

.news-year-section {
    display: flex;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.year-tab {
    background-color: white;
    padding: 20px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #ddd;
    color: #2c7a9f;
    font-weight: 700;
    font-size: 1.2rem;
}

.news-links {
    padding: 20px;
    flex-grow: 1;
    background-color: white;
}

.news-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-links li {
    margin-bottom: 15px;
}

.news-links li:last-child {
    margin-bottom: 0;
}

.news-links a {
    color: #666;
    text-decoration: underline;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

.news-links a:hover {
    color: #2c7a9f;
}

.accessibility-tag {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #f1a53b;
    color: white;
    padding: 10px;
    border-radius: 0 4px 4px 0;
    z-index: 1000;
}

/* Productos Landing Page Styles */
.productos-main-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.producto-horizontal-card {
    display: grid;
    grid-template-columns: 1fr 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Casi sin redondeo como en la imagen */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.producto-card-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.producto-card-content h3 {
    font-size: 1.8rem;
    color: #555;
    margin-bottom: 25px;
    font-weight: 600;
}

.producto-card-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
    text-align: justify;
}

.producto-card-image {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.producto-card-image img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
}

.btn-conoce-mas {
    align-self: flex-start;
    padding: 12px 60px;
    background-color: #2c7a9f;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-conoce-mas:hover {
    background-color: #1e5a78;
}

/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Tablets y pantallas medianas (max-width: 992px) */
@media (max-width: 992px) {
    .producto-horizontal-card {
        grid-template-columns: 1fr;
    }

    .producto-card-image {
        order: -1;
        height: 300px;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .products-grid,
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .maps-overlay-content,
    .news-overlay-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .conocenos-flex {
        flex-direction: column;
        gap: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 0.85rem;
    }
}

/* Móviles grandes y tablets pequeñas (max-width: 768px) */
@media (max-width: 768px) {

    /* Top Bar */
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-bar-right {
        flex-direction: column;
        gap: 10px;
    }

    /* Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 80px 20px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu li a {
        display: block;
        padding: 15px 10px;
    }

    .nav-menu .active {
        padding: 15px 10px;
    }

    .submenu {
        position: static;
        transform: none;
        box-shadow: none;
        min-width: 100%;
        display: none;
        padding: 0;
        background-color: #f8f9fa;
    }

    .has-submenu.open .submenu {
        display: block;
    }

    .submenu li {
        border-bottom: none;
        padding-left: 15px;
    }

    .submenu li a {
        padding: 10px;
        font-size: 0.85rem;
    }

    .logo img {
        height: 60px;
    }

    /* Banner */
    .top-banner h1 {
        font-size: 1.5rem;
    }

    .top-banner p {
        font-size: 0.9rem;
    }

    /* Portal Hero */
    .portal-hero {
        min-height: 400px;
        padding: 40px 30px;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-description {
        font-size: 1rem;
    }

    /* Page Titles */
    .page-title {
        font-size: 3rem;
    }

    .page-title2 {
        font-size: 2.5rem;
    }

    /* Recursos Grid */
    .recursos-grid {
        flex-direction: column;
        align-items: center;
    }

    .recurso-card {
        max-width: 100%;
    }

    /* Maps and News Overlay */
    .maps-overlay-text h2,
    .news-overlay-text h2 {
        font-size: 32px;
    }

    .maps-overlay-description p,
    .news-overlay-description p {
        font-size: 16px;
    }

    /* Product Content */
    .product-content h2,
    .tool-content h2 {
        font-size: 28px;
    }

    .product-content p,
    .tool-content p {
        font-size: 15px;
    }

    /* Conocenos */
    .conocenos-content h2 {
        font-size: 2rem;
    }

    .conocenos-content p {
        font-size: 1rem;
    }

    /* Footer */
    footer {
        padding: 60px 20px 30px 20px;
    }

    .footer-content {
        gap: 30px;
        margin-bottom: 40px;
    }

    /* Municipios Grid */
    .municipios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Productos Card */
    .producto-card-content {
        padding: 30px;
    }

    .producto-card-content h3 {
        font-size: 1.5rem;
    }

    .producto-card-content p {
        font-size: 1rem;
    }
}

/* Móviles pequeños (max-width: 480px) */
@media (max-width: 480px) {

    /* Container Padding */
    .container,
    .portal-container {
        padding: 0 15px;
    }

    /* Top Bar */
    .top-bar {
        font-size: 12px;
        padding: 8px 0;
    }

    /* Navigation */
    nav {
        padding: 10px 15px;
        flex-direction: column;
        gap: 15px;
    }

    .logo img {
        height: 50px;
    }

    .nav-menu {
        width: 100%;
    }

    .nav-menu a {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    /* Banner */
    .top-banner {
        padding: 20px 15px;
    }

    .top-banner h1 {
        font-size: 1.2rem;
    }

    .top-banner p {
        font-size: 0.8rem;
    }

    /* Portal Hero */
    .portal-hero {
        min-height: 300px;
        padding: 30px 20px;
    }

    .agency-name {
        font-size: 0.9rem;
    }

    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .welcome-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Sidebar */
    .sidebar-block {
        padding: 20px;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-input-group input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .btn-search {
        width: 100%;
        padding: 12px;
    }

    .pr-map {
        width: 100%;
    }

    /* Page Titles */
    .page-title {
        font-size: 2rem;
    }

    .page-title2 {
        font-size: 1.8rem;
    }

    /* Content Sections */
    .content-page,
    .productos-section,
    .tool-section {
        padding: 40px 0;
    }

    .maps-overlay-section,
    .news-overlay-section {
        padding: 60px 15px;
    }

    .maps-overlay-text h2,
    .news-overlay-text h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .maps-overlay-text h3,
    .news-overlay-text h3 {
        font-size: 12px;
    }

    .maps-overlay-description p,
    .news-overlay-description p {
        font-size: 14px;
    }

    /* Product Content */
    .product-content h2,
    .tool-content h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .product-content p,
    .tool-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Conocenos */
    .conocenos-section {
        padding: 40px 0;
    }

    .conocenos-content h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .conocenos-content p {
        font-size: 0.9rem;
    }

    /* Recursos */
    .recursos-section {
        padding: 40px 0;
    }

    .recursos-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .recurso-card {
        padding: 20px;
    }

    .recurso-card h3 {
        font-size: 1.2rem;
    }

    .recurso-card p {
        font-size: 0.85rem;
    }

    /* Buttons */
    .btn {
        padding: 12px 30px;
        font-size: 0.85rem;
    }

    .btn-conoce-mas {
        padding: 10px 40px;
        font-size: 0.8rem;
        width: 100%;
        text-align: center;
    }

    .outline-btn {
        padding: 8px 20px !important;
        font-size: 12px;
    }

    /* Footer */
    footer {
        padding: 40px 15px 20px 15px;
    }

    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        font-size: 0.85rem;
        padding-top: 20px;
    }

    /* Municipios Grid */
    .municipios-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .municipio-card {
        padding: 15px;
    }

    /* Productos Card */
    .producto-card-content {
        padding: 20px;
    }

    .producto-card-content h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .producto-card-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .producto-card-image {
        padding: 20px;
        height: 200px;
    }

    /* Page Hero */
    .page-hero {
        height: 150px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    /* Accessibility Button */
    .accessibility-btn,
    .accessibility-tag {
        padding: 8px;
        font-size: 18px;
    }

    /* News Links */
    .year-tab {
        min-width: 80px;
        padding: 15px;
        font-size: 1rem;
    }

    .news-links {
        padding: 15px;
    }

    .news-links a {
        font-size: 0.85rem;
    }
}