/* ============================================
   PUEBLISERC.ES - Financial Services Website
   Modern, Professional, Responsive Design
   ============================================ */

/* === CSS RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Financial Services Theme */
    --primary-color: #1a4d7c;
    --primary-dark: #133a5e;
    --primary-light: #2563a8;
    --secondary-color: #d4af37;
    --secondary-dark: #b8962e;
    --accent-color: #e8f1f8;
    --text-dark: #1a1a1a;
    --text-light: #4a4a4a;
    --text-muted: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #0f2035;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;

    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === LAYOUT UTILITIES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.section {
    padding: var(--spacing-lg) 0;
}

.section-dark {
    background-color: var(--bg-dark);
    color: var(--bg-white);
}

.section-light {
    background-color: var(--bg-light);
}

/* === HEADER === */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo:hover {
    color: var(--primary-dark);
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    font-weight: 500;
    color: var(--text-dark);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
    pointer-events: none;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* === HERO SECTION === */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 77, 124, 0.95) 0%, rgba(19, 58, 94, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3rem;
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* === SERVICES SECTION === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px 10px 0 0;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.service-card .btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

/* === FEATURES / BENEFITS === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
}

/* === STATS SECTION === */
.stats {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--accent-color);
}

/* === TEAM SECTION === */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background-color: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-align: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.team-member-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-member-info {
    padding: 1.5rem;
}

.team-member-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.team-member-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === BLOG SECTION === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background-color: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* === ARTICLE PAGE === */
.article-hero {
    padding: 3rem 0;
    background-color: var(--bg-light);
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.article-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin: 2rem 0;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* === CONTACT FORM === */
.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    padding: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-info-item div h4 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--error-color);
}

.form-group.error .form-error {
    display: block;
}

/* === MAP === */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === FOOTER === */
.footer {
    background-color: var(--bg-dark);
    color: var(--accent-color);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--accent-color);
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

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

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-dark);
    color: var(--bg-white);
    padding: 1.5rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: var(--accent-color);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* === SECTION HEADER === */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero h1 {
        font-size: 2.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-normal);
        align-items: flex-start;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .services-grid,
    .features-grid,
    .team-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .hero h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}
