/*
Theme Name: Genaro Chinchay - Fundador, Autor e Inversor
Description: Tema profesional para el blog de Genaro Chinchay, fundador de Titanic Soft y autor del libro "Señor Alcalde". Optimizado para SEO con diseño elegante.
Version: 1.2.0
Author: Genaro Chinchay
Text Domain: genaro-investor
*/

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background-color: #f8f9fa;
    font-size: 16px;
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.3rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1.5rem;
    color: #5a6c7d;
}

a {
    color: #5d6d7e;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2c3e50;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo {
    flex: 1;
}

.site-logo h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.site-logo h1 a {
    color: white;
    text-decoration: none;
}

.site-tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: -5px;
    font-weight: 300;
}

/* Navigation */
.main-navigation {
    flex: 2;
    text-align: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-content: center;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Header CTA */
.header-cta {
    flex: 1;
    text-align: right;
}

.subscribe-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.subscribe-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-primary:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
    color: white;
}

.cta-secondary {
    color: white;
    border: 2px solid white;
    padding: 1.2rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-secondary:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    padding: 4rem 0;
    background: white;
}

.content-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(370px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f2f6;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.post-thumbnail {
    height: 220px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.post-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-category {
    background: #2c3e50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #5d6d7e;
}

.post-excerpt {
    color: #7f8c8d;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.read-more {
    color: #5d6d7e;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: #2980b9;
    transform: translateX(5px);
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(3px);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #1a252f 0%, #34495e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
}

.newsletter-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #ecf0f1;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    min-width: 300px;
    outline: none;
}

.newsletter-form button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.7;
}

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

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

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #5d6d7e;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.widget {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #5d6d7e;
    padding-bottom: 0.5rem;
}

/* Single Post */
.single-post {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e8ed;
}

.post-title-single {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.2;
}

.post-meta-single {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.post-content-single {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 100%;
}

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

.post-content-single h2,
.post-content-single h3,
.post-content-single h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    padding-right: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    color: white;
}

.hero-subtitle {
    font-size: 1.3rem;
    line-height: 1.5;
    margin: 0 0 2rem 0;
    opacity: 0.95;
    color: #f8f9fa;
}

.hero-benefits {
    margin: 2rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1rem 0;
    font-size: 1.1rem;
}

.benefit-icon {
    font-size: 1.2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.primary-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.primary-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.secondary-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.secondary-btn:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-container {
    position: relative;
}

.genaro-photo {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.genaro-photo:hover {
    transform: scale(1.05);
}

.credentials {
    margin-top: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.credentials-header h4 {
    color: white;
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.credentials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.credential-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.credential-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.credential-badge .icon {
    font-size: 0.9rem;
}

.credential-badge .text {
    font-weight: 500;
}

.credentials-company {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.credentials-company strong {
    color: white;
}

/* Pantallas grandes - mejor aprovechamiento del espacio */
@media (min-width: 1200px) {
    .single-post {
        max-width: 1200px;
        padding: 3rem;
    }
    
    .post-content-single {
        font-size: 1.2rem;
        line-height: 1.9;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-cta {
        text-align: center;
    }
    
    /* Hero responsive */
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .genaro-photo {
        width: 250px;
        height: 250px;
    }
    
    .credentials-list {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .credential-badge {
        width: fit-content;
        min-width: 150px;
        justify-content: center;
    }
    
    .single-post {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title-single {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 1.5rem;
    }
}

/* SEO and Accessibility */
.screen-reader-text {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #5d6d7e;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header,
    .newsletter-section,
    .site-footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}