:root {
    --primary-color: #003366;
    /* Dark Blue from Meliana */
    --secondary-color: #00a9e0;
    /* Light Blue/Cyan from Meliana */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--white);
    margin-left: 15px;
}

.socials a {
    margin-right: 10px;
    margin-left: 0;
}

/* Header */
header {
    background-color: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.logo-text h1 {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: -5px;
}

.logo-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: #008cc0;
    border-color: #008cc0;
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
}

nav li {
    position: relative;
}

nav a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 500px;
    background-image: linear-gradient(rgba(0, 51, 102, 0.4), rgba(0, 51, 102, 0.4)), url('assets/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Quick Links */
.quick-links {
    padding: 40px 0;
    background-color: var(--light-bg);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-link-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.quick-link-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.quick-link-card span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* News Section */
.news-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    margin-bottom: -12px;
    padding-bottom: 10px;
    display: inline-block;
}

.view-all {
    color: var(--secondary-color);
    font-weight: 600;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.news-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 200px;
    background-color: #eee;
}

.news-content {
    padding: 20px;
}

.date {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.4;
}

.news-content p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-col p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.footer-socials a:hover {
    background-color: var(--secondary-color);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

/* --- Subpages Styles --- */

.page-content {
    padding: 40px 20px;
    min-height: 60vh;
}

.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.breadcrumb {
    color: #666;
    font-size: 0.9rem;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Ayuntamiento */
.mayor-greeting {
    display: flex;
    gap: 30px;
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
}

.mayor-image {
    flex: 0 0 200px;
    height: 250px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #aaa;
    border-radius: 4px;
}

.greeting-text {
    flex: 1;
}

.council-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.council-member {
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.member-avatar {
    width: 100px;
    height: 100px;
    background-color: #eee;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #aaa;
}

.council-member h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.council-member .role {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.council-member .party {
    font-size: 0.85rem;
    color: #666;
}

/* Areas */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--secondary-color);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-card a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 10px;
    display: inline-block;
}

/* Municipio */
.municipio-intro {
    display: flex;
    gap: 30px;
    align-items: center;
}

.municipio-img {
    width: 50%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.municipio-text {
    width: 50%;
}

.festivities-list li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.festivities-list h3 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Transparencia */
.transparency-list {
    display: grid;
    gap: 20px;
}

.transparency-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.transparency-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.transparency-item h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.download-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Contacto */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    width: 30px;
    text-align: center;
}

.info-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-form-wrapper {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
}

.contact-form-wrapper h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

/* Responsive Subpages */
@media (max-width: 768px) {
    .mayor-greeting {
        flex-direction: column;
    }

    .mayor-image {
        width: 100%;
        height: 200px;
    }

    .municipio-intro {
        flex-direction: column;
    }

    .municipio-img,
    .municipio-text {
        width: 100%;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}