/* Wrapper */
.ibg-layout-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    color: #444;
}

/* Typography & Meta */
.ibg-meta {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: center;
}
.ibg-excerpt {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 400;
}
.ibg-title-large, .ibg-title-medium, .ibg-title-small {
    text-align: center;
    margin: 0 0 15px 0;
    font-weight: 300;
    color: #444;
    line-height: 1.3;
}
.ibg-title-large a, .ibg-title-medium a, .ibg-title-small a {
    color: #444;
    text-decoration: none;
    transition: color 0.3s;
}
.ibg-title-large a:hover, .ibg-title-medium a:hover, .ibg-title-small a:hover {
    color: #3e64a1;
}
.ibg-title-large { font-size: 32px; }
.ibg-title-medium { font-size: 26px; }
.ibg-title-small { font-size: 24px; }

/* Buttons */
.ibg-btn-blue {
    display: inline-block;
    background-color: #3e64a1;
    color: #fff !important;
    padding: 12px 35px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}
.ibg-btn-blue:hover {
    background-color: #000000;
}
.ibg-grid-content .ibg-btn-blue,
.ibg-horiz-content .ibg-btn-blue {
    margin-top: auto;
}

/* 1. HERO */
.ibg-hero {
    width: 100%;
    height: 550px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}
.ibg-hero-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.15); 
    display: flex;
    align-items: center;
    justify-content: center;
}
.ibg-hero-card {
    background: #fff;
    padding: 40px 60px;
    max-width: 650px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* MAIN CONTENT (Sidebar + Posts) */
.ibg-main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* SIDEBAR */
.ibg-sidebar {
    flex: 0 0 300px; /* Fixed width sidebar approx 30% */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ibg-sidebar-block {
    width: 100%;
}

/* Hola Block */
.ibg-static-hola {
    background-size: cover;
    background-position: center;
    color: #fff;
    min-height: 400px;
    position: relative;
}
.ibg-hola-overlay {
    background-color: rgba(99, 133, 175, 0.85);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.ibg-static-title {
    font-size: 60px;
    margin: 0 0 20px 0;
    font-weight: 700;
    color: #fff;
}
.ibg-static-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #fff;
}
.ibg-static-subtitle {
    font-size: 26px;
    font-style: italic;
    margin-bottom: 40px;
    color: #fff;
    font-weight: 600;
}
.ibg-static-footer {
    font-size: 11px;
    margin-top: auto;
    opacity: 0.9;
    font-weight: 500;
    white-space: nowrap;
}

/* Proyectos Block */
.ibg-static-proyectos {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.ibg-proyectos-overlay {
    background: rgba(0,0,0,0.4);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.ibg-proyectos-overlay h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* Instagram Block */
.ibg-static-instagram img {
    width: 100%;
    height: auto;
    display: block;
}

/* POSTS AREA */
.ibg-posts-area {
    flex: 1; /* Takes remaining space (approx 70%) */
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Horizontal Card */
.ibg-horizontal-card {
    display: flex;
    background: #f7f7f7;
    width: 100%;
}
.ibg-horiz-img {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 350px;
}
.ibg-horiz-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* STANDARD GRID (Inside Posts Area) */
.ibg-standard-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px 30px;
}
@media (min-width: 900px) {
    .ibg-standard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.ibg-grid-card {
    background: transparent;
    display: flex;
    flex-direction: column;
}
.ibg-grid-img {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    display: block;
}
.ibg-grid-content {
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

/* Pagination */
.ibg-pagination {
    text-align: center;
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ibg-pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    color: #3e64a1;
    background: transparent;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.ibg-pagination .page-numbers.current {
    font-weight: 700;
    color: #000;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .ibg-main-content { flex-direction: column; display: flex; }
    .ibg-sidebar { flex: 1; width: 100%; order: 2; }
    .ibg-posts-area { width: 100%; order: 1; }
}
@media (max-width: 768px) {
    /* Make Hero look like standard grid card */
    .ibg-hero {
        background-position: top center;
        background-size: 100% 280px;
        background-repeat: no-repeat;
        height: auto;
        min-height: 0;
        margin-bottom: 40px;
        padding-top: 280px; /* Space for the image */
        display: block;
        background-color: transparent !important;
    }
    .ibg-hero-overlay {
        background: transparent;
        padding: 20px 0 0 0; 
        height: auto;
        display: block;
    }
    .ibg-hero-card {
        background: transparent;
        padding: 0;
        margin: 0;
        width: 100%;
        box-shadow: none;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ibg-hero-card .ibg-title-large {
        font-size: 24px;
        margin: 0 0 15px 0;
    }
    
    /* Make Horizontal look like standard grid card */
    .ibg-horizontal-card { 
        flex-direction: column; 
        background: transparent; 
        margin-bottom: 40px;
    }
    .ibg-horiz-img { 
        min-height: 280px; 
        height: 280px; 
        width: 100%; 
    }
    .ibg-horiz-content { 
        padding: 20px 0 0 0; 
    }
    
    /* Make standard grid look exactly the same */
    .ibg-grid-card {
        margin-bottom: 40px;
    }
    .ibg-grid-content {
        padding: 20px 0 0 0;
    }
    .ibg-standard-grid {
        gap: 0;
    }
    
    /* Mobile Pagination Fix */
    .ibg-pagination .page-numbers {
        font-size: 12px !important;
        padding: 0 4px !important;
        min-width: auto !important;
        height: auto !important;
        line-height: 1 !important;
    }
}
