/*
 Theme Name: H2MIRI Child Theme
 Template: twentytwentyfour
 Description: A child theme for the Twenty Twenty-Four theme.
 Version: 1.2
 Author: H2MIRI
*/

/* ==============================
   CSS IMPORT ORDER (Mobile-First)
   ============================== */

/* 1. Design Tokens & Variables */
@import url('./styles/variables.css');

/* 2. Responsive Utilities & Breakpoint System */
@import url('./styles/utilities.css');

/* 3. Reusable Component Styles */
@import url('./styles/components.css');

/* 4. Feature-Specific Styles (below) */
/* ==============================
   CUSTOM COLOR OVERRIDES
   (Base values defined in variables.css)
   ============================== */
:root {
    --primary: #003366;
    --primary-hover: #004d80;
    --dark: #1a1a1a;
    --opaque: #000000ab;
    --gray-bg: #ebebeb;
    --card-radius: 9px;
    --font-body: 'Inter', sans-serif;
}

  body {
    margin: 0;
    padding: 0;
    background-color: #ffffff !important;
    color: #000000;
  }
  html {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff !important;
  }

#content {
    padding: 20px;
}

.update-plugins {
    background: #d63638;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}


/*
———— HEADER STYLES ————
*/

header {
    width: 100%;
}
.header-left {
    display: flex;
}

.header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px 0px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #111;
    gap: 0.7rem;

}

#modal-1-content{
    line-height: 3rem;
}

#wp-admin-bar-top-secondary {
    display: flex;
    flex-direction: row;
}

#wpadminbar{
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05), 0 8px 16px rgba(255, 255, 255, 0.1);
}

.join-button {
    transition: background-color 0.3s ease;
    background-color: #003366;
    color: #eee;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 400;
    margin-left: 20px;
    font-size: small;
    align-content: center;
    font-variant: unset;
}

/* Mobile responsive container - join button styling */
.wp-block-navigation__responsive-container-content .join-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
    padding: 12px 24px;
    font-size: 0.95rem;
    line-height: 1.5;
    width: auto;
    min-width: 120px;
}

.join-button:hover {
    background-color: #353c5b;
}

.header-left img{
    width: 250px;
    height: auto;
    min-width: 100px;
}

.header-left img:hover {
    transform: scale(1.01);
}

.site-logo {
    max-width: 120px;
}

.site-title{
    margin-left: 40px;


}

.header-menu ul{
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    font-weight: 400; 
    font-family: "Inter";
    max-width: 1800px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.header-menu li a{
    text-decoration-line: none;
    color: white;
    text-wrap: nowrap;

}

.header-menu-link {
    text-decoration: none;
    font-size: 1rem;
}

.header-menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 5px 0;
    font-variant: all-small-caps;
    gap: 4.5rem;
    

}

.header-menu-item {
    font-weight: 300;
    letter-spacing: 0.1rem;
}
.header-menu-link:hover {
    text-decoration: none;
    opacity: 0.8;
}

#wp-admin-bar-login{
    margin-right: 5rem !important;
 }

.wp-block-navigation-item__content[aria-current="page"] {
    border: 1px solid #ffffffac;

    border-radius: 5px;
}
/* ———— ! HEADER STYLES ———— */


/* —— Footer Styles ———— */

footer {
    width: 100%;

}

.footer-area{
    justify-content: center;
}
.site-footer {
    padding: 40px 0;
}

.wp-block-site-title a {
    line-height: 2.5;
}

.wp-block-site-title, .site-title {
    text-wrap: nowrap;
}

.site-title {
    margin: 0;
    display: flex;
}

.footer-left .site-title a {
    font-size: 2rem;
    font-weight: 300;
    color: white;

}

.footer-left {
line-height: 5rem;

}


.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #A4A4A4;
}

.footer-partner-logos{
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    flex-direction: row;
    margin-top: 2rem;
}

.partner-logo[src*="Screenshot-2025-05-06-at-16.46.52-edited-1.avif"] {
    max-width: 110px;  /* adjust size as needed */
    height: auto;
}

.partner-logo[src*="AKA_EN_vaaka_musta_RGB.svg"] {
    min-width: 200px;  /* adjust size as needed */
    height: auto;
}

.footer-partner-logos img{
    width: auto;
    max-width: 230px;
    min-width: 125px;
    height: auto;
    max-height: 70px;
}

.footer-menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
    gap: 30px;
    letter-spacing: 0.1rem;
    flex-wrap: wrap;
    font-variant: all-small-caps;
    align-content: center;
}

.footer-menu a {
    margin-right: 10px;
    color: black;
    font-weight: 400 !important;
    text-decoration: none;
}
.footer-menu a:hover{
    color: #83838362;
    cursor: pointer;
}

.footer-menu-link {
    text-decoration: none;
    font-size: 1rem;
}
.footer-menu-link:hover {
    text-decoration: none;
    opacity: 0.8;
}

.footer-img img{
    height: 50px;
    object-fit: contain;
    width: 190px !important;
}
.footer-img {
    width: 190px;
}

footer {
    min-width: 100%;
}

.footer-logo-title {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    align-items: flex-start;
    margin-right: 50px;
}

.footer-logo img{
    margin-right: 10px;
    width: 90px;
    height: auto;
}

.footer-title {
    font-size: 1.2em;

}

.footer-title a{

    text-decoration: none;
}

.footer-columns {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex: 1;
}

.footer-column {
    flex: 1;
    margin: 0 10px;
}

.footer-column h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    color: white;
    font-style: normal;
    font-weight: 600;
}

.wp-block-navigation__container {
    list-style: none;
    padding: 0;
    text-wrap: nowrap;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
    visibility: hidden;

}

/* ——— Media s Styling ——— */ 
@media (max-width: 1080px) {

    .wp-block-navigation__container{
        justify-content: center;
    }
}

.footer-container .wp-block-navigation-item a {
    display: block;
    color: black !important;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400 !important;
}

/* Hero Column Styling - Uniform and Responsive */
.hero-column-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}

.hero-column {
    position: relative;
    flex: 1;
    min-width: 275px;
    max-width: 500px;
    aspect-ratio: 16/10; /* Maintains consistent proportions */
    overflow: hidden;
    border-radius: var(--card-radius, 8px);
    background: #f0f0f0;
    transition: all 0.3s ease;
}

.hero-column:hover {
    cursor: pointer;
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.hero-column:hover img {
    transform: scale(1.05);
}

.hero-column-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.hero-column-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.hero-column-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}



.wp-block-navigation-item ul{
    list-style: none;
    
}

.wp-block-navigation-item a:hover {
    text-decoration: none;
}


/* —— General Styling for Site —— */

.wp-block-group {
    font-family: 'Inter';
    font-weight: 300;
}


.wp-block-navigation__container {
    letter-spacing: 0.1rem;
    font-size: 1rem;
    font-family: 'Inter' !important;
}

.wp-block-navigation-item__content{
    padding: 5px;
}
.wp-block-navigation .wp-block-navigation-item__label,
.header-menu li{
    font-variant: all-small-caps;
    font-style: normal;
    letter-spacing: 0.125rem;
    margin: 2rem; 
}
.header-menu li{
    margin: 0 !important;
    align-content: center;
}
.wp-block-navigation-item__label:hover {
    color: #c4c4c4;
}

 .gutena-forms-contact-form {
    padding: 2rem;
    background-color: #000000e3;
    border-radius: 4px;
    border: 2px solid #a9a9a9;

}

.wp-block-post-title{
    font-weight: 500;
    padding-bottom: 0;
    margin-top: 2px !important;
    text-align: center !important;
    align-items: center;

    color: black !important;
}
.wp-block-spacer{
    max-height: 30px;
}

.wp-block-navigation ul {
    margin-left: 1rem;
    margin-right: 2rem;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1; /* Keep it always visible */
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    background: rgba(0, 0, 0, 0.3);
}

[data-key="field_675af9ae96aad"] {
    background-color: #f9f9f9; /* Light background color */
    border: 1px solid #ddd; /* Border around the field */
    padding: 10px; /* Padding inside the field */
    border-radius: 5px; /* Rounded corners */
    display: flex; /* Flexbox layout */
    justify-content: space-between; /* Space between label and checkbox */
    align-items: center; /* Vertically center the content */
}


@media (min-width: 1080px){
    .header-right {
        padding-left: 2rem;
    }
}


@media (max-width: 980px) {
    .header-right{
        display: flex;
        flex-wrap: wrap;
    }
}

.footer-partner-logos a{
    margin: 20px;
}

/* Hero Column Responsive Breakpoints */
@media (max-width: 1200px) {
    .hero-column {
        min-width: 280px;
        max-width: 450px;
    }
    
    .hero-column-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 868px) {
    .landing-page-img {
        display: none;	
    }

    .about-us-col {
        flex-direction: column;
        align-items: center; 
        align-items: stretch;
    }

    .about-button {
        max-width: 100% !important;
        
    } 
    
    .hero-column-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .hero-column {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        aspect-ratio: 16/9; /* Slightly different ratio for mobile */
    }
    
    .hero-column-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .hero-column-title {
        font-size: 1.2rem;
    }
    
    .hero-column-text {
        font-size: 0.85rem;
    }
}

.header-space{
    padding-left: 0;
    padding-right: 0;
}
.header-left{
    margin-right: 0;
}
    .header-menu{
        flex-wrap: wrap;
    }
    .related-infra-cards .user-card,
    .related-infra-cards .infra-card {
        width: 150px;
    }

    .modal-description, .contact-info {
        width: 100%;
        margin-bottom: 20px;
    }

    .modal-content-container {
        flex-direction: column;
    }
    .footer-partner-logos{
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        }


.hero-content-column{
    padding: 3rem !important;
}

@media (max-width: 500px) {

.register-button-home-page{
    margin: auto;
    padding: 0;
}


    .footer-menu, .header-menu { 
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
    }
    .hero-column {
        aspect-ratio: 4/3; /* More square ratio for small screens */
    }
    
    .hero-column-content {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .hero-column-title {
        font-size: 1.1rem;
        font-weight: 500;
    }
    
    .hero-column-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }
.hero-content-column{
    padding: 3rem !important;
}

.hero-banner {
  margin-bottom: 3rem;

}
.navigation-mobile {
    font-size: 2rem;
}

.hero-image-mobile{
    display: none;
}
.hero-content-border{
    border-left: none;
}

.header-space{
    padding-left: 0;
    padding-right: 0;
}
.header-left{
    margin-right: 0;
}
    .header-menu{
        flex-wrap: wrap;
    }
    .related-infra-cards .user-card,
    .related-infra-cards .infra-card {
        width: 150px;
    }

    .modal-description, .contact-info {
        width: 100%;
        margin-bottom: 20px;
    }

    .modal-content-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    body {
      font-size: 14px;
    }
    .container {
      width: 100%;
      flex-direction: column;
    }
  }
  
  @media (min-width: 769px) and (max-width: 1200px) {
    .container {
      width: 80%;
      margin: auto;
    }
  }
  
  @media (min-width: 1201px) {
    .container {
      width: 1200px;
      margin: auto;
    }
  }

  @keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.skeleton-card::after,
.skeleton-image::after,
.skeleton-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.2) 75%);
    background-size: 200% 100%;
    animation: shimmer 0.5s infinite;
}

.skeleton-image::after {
    background-size: 300% 100%;
}

.skeleton-text::after {
    background-size: 150% 100%;
}

.custom-link-class{
    margin-right: 1rem !important;
}

/* Hero Column Utility Classes */
.hero-section {
    padding: 2rem 0;
    margin: 2rem 0;
}

.hero-column-2 .hero-column {
    flex: 1 1 calc(50% - 0.5rem);
}

.hero-column-3 .hero-column {
    flex: 1 1 calc(33.333% - 0.67rem);
}

.hero-column-4 .hero-column {
    flex: 1 1 calc(25% - 0.75rem);
}

/* Ensure images load properly */
.hero-column img[src=""], 
.hero-column img:not([src]) {
    background: #f0f0f0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><rect width="40" height="40" fill="%23ddd"/><text x="50%" y="50%" text-anchor="middle" dy="0.3em" fill="%23999">Image</text></svg>') center/50px no-repeat;
}

@media (max-width: 768px) {
    .hero-column-2 .hero-column,
    .hero-column-3 .hero-column,
    .hero-column-4 .hero-column {
        flex: 1 1 100%;
    }
}

/* Related Cards Container - Hide when empty */
.related-cards:empty,
.related-cards:not(:has(*)),
.training-material-sidebar:has(.related-cards:empty),
.case-study-sidebar:has(.related-cards:empty) {
    display: none !important;
}

/* Hide sidebar sections when related cards are empty */
.training-material-sidebar:has(.related-cards:empty) h5,
.case-study-sidebar:has(.related-cards:empty) h5 {
    display: none;
}

/* Hide entire sidebar if all children are empty */
.training-material-sidebar:not(:has(*:not(:empty))),
.case-study-sidebar:not(:has(*:not(:empty))) {
    display: none;
}

/* Alternative approach for browsers that don't support :has() */
.related-cards.no-content,
.training-material-sidebar.no-related-cards,
.case-study-sidebar.no-related-cards {
    display: none !important;
}

/* Hide related sections with specific empty state classes */
.related-section-empty {
    display: none !important;
}

.related-cards-container:empty::before {
    content: '';
    display: none;
}

/* Ensure proper spacing when sidebar is hidden */
.single-training-material .content-area:not(:has(.training-material-sidebar:not([style*="display: none"]))),
.single-case-study .content-area:not(:has(.case-study-sidebar:not([style*="display: none"]))) {
    width: 100%;
    max-width: 100%;
}

/* ==============================
   NAVIGATION FOCUS STATE STYLING
   ============================== */
/* Navigation link focus state with border-radius */
.wp-block-navigation-item__content:focus {
    outline: none;
    box-shadow: 0 0 0 2px white;
    border-radius: 12px;
}

/* Navigation link active state styling */
.wp-block-navigation-item__content[aria-current="page"] {
    border-radius: 12px;
}

