/*
Theme Name: Indian Institute Of Oriental Heritage
Description: Full-width responsive layout for Indian Institute Of Oriental Heritage
Version: 1.0.0
*/

/* Reset & Global Rules */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Outer Container - Full Screen Width */
.site {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    box-shadow: none;
}

/* Header Styles */
.site-header {
    width: 100%;
    padding: 25px 4%;
    border-bottom: 3px solid #800020;
    background: #ffffff;
}

.site-title {
    font-size: 28px;
    margin-bottom: 5px;
}

.site-title a {
    color: #800020;
    text-decoration: none;
    font-weight: bold;
}

.site-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Centered Logo Container */
.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0 10px;
}

.custom-logo-link {
    display: inline-block;
    text-decoration: none;
}

/* Logo Image Sizing & Responsiveness */
.header-logo-img,
.custom-logo {
    max-height: 250px; /* Adjust height according to design needs */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-container {
        padding: 10px 0 5px;
    }

    .header-logo-img,
    .custom-logo {
        max-height: 75px; /* Scaled down for mobile viewports */
    }
}


/* Navigation Bar */
.main-navigation {
    width: 100%;
    background: #800020;
    margin-top: 15px;
    border-radius: 4px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 4%;
}

.main-navigation a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.main-navigation a:hover {
    text-decoration: underline;
}

/* Main Content Area */
.site-content,
.site-main {
    width: 100%;
    padding: 30px 4%;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #800020;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

p {
    margin-bottom: 15px;
}

/* Hero Section & Banner */
.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    margin: 15px 0 25px;
}

/* Institutes Grid Layout */
.institute-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    margin-top: 20px;
}

.institute-card,
.gallery-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.institute-card img,
.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.institute-card h3 {
    font-size: 16px;
    color: #800020;
    margin-top: 8px;
}

/* Contact Details Box */
.contact-box {
    background: #fdf8f8;
    border-left: 4px solid #800020;
    padding: 15px 20px;
    margin-top: 15px;
}

/* Footer Styling */
.site-footer {
    width: 100%;
    background: #222222;
    color: #ffffff;
    text-align: center;
    padding: 25px 4%;
    margin-top: 40px;
    font-size: 14px;
}

/* Responsive adjustment for Mobile Devices */
@media (max-width: 768px) {
    .site-header,
    .site-content,
    .site-main,
    .site-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .main-navigation ul {
        padding: 10px 15px;
        gap: 12px;
    }

    .institute-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}



/* ==========================================
   Header & Responsive Navigation Bar
   ========================================== */

.custom-header {
    width: 100%;
    background-color: #ffffff;
    text-align: center;
    padding-top: 15px;
}

.logo-container {
    display: inline-block;
    margin-bottom: 10px;
}

.header-logo-img {
    max-height: 110px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Full Width Navigation Bar */
.full-width-nav {
    width: 100%;
    background-color: #009640; /* Matching green shade */
    position: relative;
    z-index: 999;
}

.nav-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hide Hamburger Toggle Button on Desktop */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 20px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.hamburger-icon {
    font-size: 22px;
    margin-right: 8px;
}

/* Main Navigation Menu */
.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    color: #ffffff;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-menu .arrow {
    font-size: 11px;
    margin-left: 3px;
}

/* Active & Hover States */
.nav-menu li.current-menu-item > a,
.nav-menu a:hover {
    color: #ffd700; /* Yellow highlight */
}

/* ==========================================
   Desktop Sub-Menu Dropdowns
   ========================================== */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #007a33; /* Slightly darker green for dropdown */
    list-style: none;
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: none; /* Hidden by default */
    border-radius: 0 0 4px 4px;
}

.nav-menu .sub-menu li {
    width: 100%;
    text-align: left;
}

.nav-menu .sub-menu a {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu .sub-menu a:hover {
    background-color: #006329;
    color: #ffd700;
}

/* Show Sub-Menu on Desktop Hover */
@media (min-width: 993px) {
    .nav-menu li:hover > .sub-menu {
        display: block;
    }
}

/* ==========================================
   Mobile Responsive Navigation (< 992px)
   ========================================== */
@media (max-width: 992px) {
    .header-logo-img {
        max-height: 80px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
    }

    .nav-wrapper {
        flex-direction: column;
    }

    /* Hide menu on mobile by default */
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #008739;
    }

    /* Toggle menu active state */
    .nav-menu.is-active {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-menu a {
        padding: 12px 20px;
        justify-content: space-between;
    }

    /* Mobile Sub-Menu Accordion */
    .nav-menu .sub-menu {
        position: static;
        width: 100%;
        background-color: #00682c;
        box-shadow: none;
    }

    .nav-menu .menu-item-has-children.open-submenu > .sub-menu {
        display: block;
    }
}




/* Gallery Container - 2 Columns on Desktop & Laptop */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Exactly 2 equal columns */
    gap: 25px; /* Spacing between grid items */
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Individual Gallery Cards */
.gallery-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin: 0 auto 10px;
}

.gallery-item .caption {
    font-size: 14px;
    color: #444;
    margin: 5px 0 0;
    line-height: 1.4;
}

/* Mobile View - Collapse to 1 Column */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 single column on mobile */
        gap: 18px;
    }

    .gallery-item img {
        max-height: none; /* Allows natural image height on small screens */
    }
}

/* ==========================================
   Responsive Image Grid (2 Columns Desktop / 1 Column Mobile)
   ========================================== */

/* Turn entry-content into a 2-column flex wrap container */
.entry-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

/* Ensure text paragraphs and headings take full width */
.entry-content > p,
.entry-content > h1,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > h5,
.entry-content > h6,
.entry-content > ul,
.entry-content > ol,
.entry-content > div:not(.wp-block-image) {
    width: 100%;
}

/* Force Image blocks, Figures, and standard WordPress Image wrappers into 2 equal columns */
.entry-content > figure,
.entry-content > .wp-block-image,
.entry-content p:has(> img) {
    width: calc(50% - 10px); /* 2 Columns on Desktop & Laptop */
    margin: 0 0 15px 0;
    box-sizing: border-box;
}

/* Style images cleanly */
.entry-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Mobile Devices (Collapse to 1 Column) */
@media (max-width: 768px) {
    .entry-content > figure,
    .entry-content > .wp-block-image,
    .entry-content p:has(> img) {
        width: 100%; /* 1 Single Column on Mobile */
    }
}