/*
Theme Name: Giunti Corporate Theme
Description: A modern, professional WordPress theme designed specifically for Giunti Psychometrics corporate website. Features a clean, responsive design with custom typography (Noto Sans + Saans Medium), modular architecture, and optimized layout for psychological assessment content. Includes pre-loaded corporate assets, partner logos, and hero video support. Built with WordPress 6.8+ Block Theme architecture for maximum flexibility and performance. REQUIRES the Giunti Corporate Plugin to function properly.
Version: 1.0.0
Author: Springbold
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giunti-corporate-theme
*/

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        margin-top: 0 !important;
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    html {
        margin-top: 0 !important;
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden;
    }
}

/* Override WordPress CSS variables to match header width */
:root {
    --wp--style--global--content-size: calc(100% - 160px); /* 100% minus left and right padding (80px each) */
    --wp--style--global--wide-size: calc(100% - 160px);
}

@media (max-width: 1440px) {
  :root {
    --wp--style--global--content-size: calc(100% - 160px);
    --wp--style--global--wide-size: calc(100% - 160px);
  }
}

@media (max-width: 768px) {
  :root {
    --wp--style--global--content-size: calc(100% - 80px); /* 40px each side */
    --wp--style--global--wide-size: calc(100% - 80px);
  }
}

@media (max-width: 480px) {
  :root {
    --wp--style--global--content-size: calc(100% - 40px); /* 20px each side */
    --wp--style--global--wide-size: calc(100% - 40px);
  }
}
@media (min-width: 1441px) {
  :root {
    --wp--style--global--content-size: 1440px;
    --wp--style--global--wide-size: 1440px;
  }
  body, .wp-site-blocks, .is-root-container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1440px !important;
  }
  header.wp-block-template-part {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
  header.wp-block-template-part .wp-block-group.has-global-padding.is-layout-constrained {
    max-width: 1440px;
    margin: 0 auto;
  }
  .wp-block-group.alignfull {
    background: #fff;
    box-sizing: border-box;
  }
}

/* Remove spacing between header and content */
.wp-site-blocks > main {
    margin-top: 0;
}

/* Override layout constraints to allow full width for specific direct children */
.wp-block-query.is-layout-constrained > .wp-block-post-template,
.wp-block-query.is-layout-constrained > .wp-block-group {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hero video block title font - ONLY this element uses Saans Medium */
.hero-title {
    font-family: 'Saans Medium', sans-serif;
}

/* Giunti Text Blocks CSS Variables */
:root {
    --giunti-block-item-title-font: 'Saans Medium', sans-serif;
    --giunti-block-title: #171717;
    --giunti-block-description: #171717;
    --giunti-block-text: #575757;
    --giunti-block-separator: #d4d4d4;
    --giunti-block-button-outline-color: #404040;
    --giunti-block-header-font: 'Saans Medium', sans-serif;
    --giunti-block-bg: #f5f5f5;
    --giunti-block-card-bg: transparent;
    --giunti-news-title-font-family: 'Saans', 'SaansMedium', Arial, sans-serif;
    --text-media-heading-font-family: 'Saans', 'SaansMedium', Arial, sans-serif;
}

/* Giunti Active Cards CSS Variables */
:root {
    --giunti-active-cards-bg: #ffffff;
    --giunti-active-cards-border: #e0e0e0;
    --giunti-active-cards-tagline-color: #171717;
    --giunti-active-cards-title-color: #171717;
    --giunti-active-cards-description-color: #666666;
    --giunti-active-cards-title-font-family: inherit;
    --giunti-active-cards-tagline-font-family: inherit;
    --giunti-active-cards-description-font-family: inherit;
    --giunti-active-cards-city-name-font-family: 'Saans Medium', 'Saans', Arial, sans-serif;
    --giunti-active-cards-city-name-font-weight: 500;
}

/* Force Active Cards city name font weight to 500 */
.wp-block-create-block-giunti-active-cards {
    --giunti-active-cards-city-name-font-weight: 500 !important;
}

/* Additional specificity to ensure font weight is applied */
.wp-block-create-block-giunti-active-cards .giunti-active-cards-city-name,
.wp-block-create-block-giunti-active-cards [class*="city-name"] {
    font-weight: 500 !important;
}

.giunti-news-title {
    font-family: 'SaansMedium', 'Saans', Arial, sans-serif !important;
    font-weight: 500 !important;
}

.giunti-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding-left: 80px;
  padding-right: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 1440px) {
  .giunti-header-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  .giunti-header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .giunti-header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 1440px) {
  .wp-block-group.alignfull {
    padding-left: 80px !important;
    padding-right: 80px !important;
  }
}

@media (max-width: 768px) {
  .wp-block-group.alignfull {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media (max-width: 480px) {
  .wp-block-group.alignfull {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Active state for navigation menu */
.wp-block-navigation__container .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation__container .is-active > .wp-block-navigation-item__content {
    border-bottom: 2px solid #2945a3;
    color: #2945a3;
    transition: border-bottom 0.2s;
}

.wp-block-navigation__container .wp-block-navigation-item__content.active {
    border-bottom: 2px solid #2945a3;
    color: #2945a3;
    transition: border-bottom 0.2s;
}

/* Single post max width and title style */
.single-post .wp-site-blocks > main,
.single-post .wp-block-post-content,
.single-post .wp-block-post-title,
.single-post .wp-block-post-featured-image {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.single-post .wp-block-post-title {
    font-size: 3.5rem;
    font-family: 'SaansMedium', 'Saans', Arial, sans-serif !important;
    font-weight: 500 !important;
}

@media (max-width: 768px) {
    .single-post .wp-block-post-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .single-post .wp-block-post-title {
        font-size: 2rem;
        line-height: 1.3;
    }
}

/* Single post meta line style */
.giunti-single-meta,
.wp-block-group[style*='flex'] {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5em;
    font-size: 1.25rem;
    line-height: 1.2;
}
.giunti-single-meta > *,
.wp-block-group[style*='flex'] > * {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin: 0 !important;
    padding: 0 !important;
}
.giunti-single-meta .wp-block-post-terms,
.giunti-single-meta .wp-block-post-terms a,
.wp-block-group[style*='flex'] .wp-block-post-terms,
.wp-block-group[style*='flex'] .wp-block-post-terms a {
    color: #2945a3 !important;
    font-weight: 500;
    text-decoration: none;
}
.giunti-single-meta .wp-block-post-author__name,
.giunti-single-meta .wp-block-post-date,
.wp-block-group[style*='flex'] .wp-block-post-author__name,
.wp-block-group[style*='flex'] .wp-block-post-date {
    font-weight: 400;
}
.giunti-single-meta p,
.wp-block-group[style*='flex'] p {
    color: #222;
    font-weight: 300;
    margin: 0 0.5em;
    display: inline;
}
.giunti-single-meta .wp-block-post-author__byline,
.wp-block-group[style*='flex'] .wp-block-post-author__byline {
    display: inline;
    font-size: inherit;
    font-weight: 400;
    margin-right: 0.25em;
}
@media (max-width: 900px) {
    .giunti-single-meta,
    .wp-block-group[style*='flex'] {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .single-post .wp-site-blocks > main,
    .single-post .wp-block-post-content,
    .single-post .wp-block-post-title,
    .single-post .wp-block-post-featured-image {
        max-width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
    }
    
    .giunti-single-meta,
    .wp-block-group[style*='flex'] {
        max-width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
        font-size: 1.1rem;
        gap: 0.4em;
    }
    
    .wp-block-group.is-layout-flex.is-nowrap {
        max-width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
    }
    
    .wp-block-post-excerpt {
        max-width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
    }
    
    /* Specific styles for post excerpt and meta elements */
    .single-post .wp-block-post-excerpt {
        max-width: calc(100% - 48px) !important;
        margin-left: 24px !important;
        margin-right: 24px !important;
    }
    
    .single-post .wp-block-group.is-content-justification-left.is-nowrap.is-layout-flex {
        max-width: calc(100% - 48px) !important;
        margin-left: 24px !important;
        margin-right: 24px !important;
    }
    
    .single-post .wp-block-create-block-giunti-mini-news {
        max-width: calc(100% - 48px) !important;
        margin-left: 24px !important;
        margin-right: 24px !important;
    }
}

@media (max-width: 480px) {
    .single-post .wp-site-blocks > main,
    .single-post .wp-block-post-content,
    .single-post .wp-block-post-title,
    .single-post .wp-block-post-featured-image {
        max-width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .giunti-single-meta,
    .wp-block-group[style*='flex'] {
        max-width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
        font-size: 1rem;
        gap: 0.3em;
        margin-bottom: 1.5rem;
    }
    
    .wp-block-group.is-layout-flex.is-nowrap {
        max-width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .wp-block-post-excerpt {
        max-width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
    
    /* Specific styles for post excerpt and meta elements */
    .single-post .wp-block-post-excerpt {
        max-width: calc(100% - 40px) !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
    
    .single-post .wp-block-group.is-content-justification-left.is-nowrap.is-layout-flex {
        max-width: calc(100% - 40px) !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
    
    .single-post .wp-block-create-block-giunti-mini-news {
        max-width: calc(100% - 40px) !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
    }
}

/* Forzar byline y autor en una sola línea y con mismo estilo */
.wp-block-post-author__content {
    display: inline;
    font-family: 'SaansMedium', 'Saans', Arial, sans-serif !important;
    font-size: 1rem;
    font-weight: 500;
}
.wp-block-post-author__content p {
    display: inline;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.wp-block-post-author__byline {
    margin-right: 0.5em;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.wp-block-post-author__name::before {
    content: ' ';
}

.giunti-single-meta .wp-block-post-terms a,
.wp-block-group[style*='flex'] .wp-block-post-terms a {
    color: #3356cc !important;
    font-variant: small-caps;
    font-weight: 500;
    text-decoration: none;
    transition: text-decoration 0.2s;
}
.giunti-single-meta .wp-block-post-terms a:hover,
.wp-block-group[style*='flex'] .wp-block-post-terms a:hover {
    text-decoration: underline;
}

.taxonomy-category.wp-block-post-terms a {
    color: #3356cc !important;
    text-transform: uppercase;
    font-weight: 500;
    text-decoration: none;
    transition: text-decoration 0.2s;
}
.taxonomy-category.wp-block-post-terms a:hover {
    text-decoration: underline;
}

.wp-block-group.is-layout-flex.is-nowrap {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.wp-block-post-excerpt {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1440px) {
    .wp-block-create-block-giunti-news {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .wp-block-create-block-giunti-news {
        max-width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
    }
}

@media (max-width: 480px) {
    .wp-block-create-block-giunti-news {
        max-width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* Global styles for giunti_custom_title class */
.giunti_custom_title {
    font-size: 3.5rem;
    font-family: 'Saans Medium', 'Saans', Arial, sans-serif;
    font-weight: 500;
}

@media (max-width: 768px) {
    .giunti_custom_title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .giunti_custom_title {
        font-size: 2rem;
        line-height: 1.3;
    }
}

/* Global styles to hide hero video overlay */
.hero-video-overlay {
    display: none;
}

/* Global styles for hero title */
.hero-title {
    font-size: 3.5rem;
    font-family: 'Saans Medium', 'Saans', Arial, sans-serif;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
}

/* Global styles for special text block header title */
.special_text_block .giunti-block-header-title {
    background: linear-gradient(to right, #3356cc, #cfd9fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Global styles for gt_super_image class - positioning and overlap */
.gt_super_image {
    position: relative;
    z-index: 10;
    margin-bottom: -50px; /* Creates overlap with the block below */
    transform: translateY(140px); /* Moves the element down even more */
}

@media (max-width: 768px) {
    .gt_super_image {
        transform: translateY(80px);
        margin-bottom: -30px;
    }
    
    .gt_super_image .wp-block-cover__image-background {
        object-position: 80% 50% !important; /* Show more of the right side */
    }
}

@media (max-width: 480px) {
    .gt_super_image {
        transform: translateY(60px);
        margin-bottom: -20px;
        min-height: 400px !important;
    }
    
    .gt_super_image .wp-block-cover__image-background {
        object-position: 90% 50% !important; /* Show even more of the right side */
    }
}

/* Global styles for special_text_block_2 class - white text and gradient title */
.special_text_block_2 .giunti-block-header-title {
    background: linear-gradient(to right, #3356cc, #cfd9fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.special_text_block_2 .info-block-tagline {
    color: #ffffff !important;
}

.special_text_block_2 .giunti-block-header-description {
    color: #ffffff !important;
}

.special_text_block_2 .giunti-block-item-description {
    color: #ffffff !important;
}

/* Background image for special_text_block_2 before pseudo-element */
.wp-block-create-block-giunti-text-blocks.giunti-block-expand-bg.special_text_block_2:before {
    background-image: url('assets/pages/about-us/earth.png') !important;
    background-size: cover !important;
    background-position: 400px center !important;
    background-repeat: no-repeat !important;
    opacity: 1 !important; /* Adjust opacity as needed */
}

@media (max-width: 768px) {
    .wp-block-create-block-giunti-text-blocks.giunti-block-expand-bg.special_text_block_2:before {
        background-position: 200px center !important;
    }
}

@media (max-width: 480px) {
    .wp-block-create-block-giunti-text-blocks.giunti-block-expand-bg.special_text_block_2:before {
        background-position: 100px center !important;
    }
}

/* Global styles for text_block_gradient class - full width background */
.text_block_gradient {
    position: relative;
    overflow: visible;
    background-color: #ffffff;
    padding: 4rem 2rem;
}

.text_block_gradient::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 110%;
    background: linear-gradient(to top, rgba(51, 86, 204, 0.15) 0%, transparent 100%);
    z-index: -1;
}

/* Global styles for gt_our_values class */
.gt_our_values::before {
    top: -6rem !important;
    height: 125% !important;
}

/* Global styles for text_block_gradient description */
.text_block_gradient .giunti-block-header-description {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* Single post styles for giunti-mini-news block - using same width as other single post elements */
.single-post .wp-block-create-block-giunti-mini-news {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Global styles for footer address */
.giunti-footer-address,
p.giunti-footer-address,
.giunti-footer p.giunti-footer-address {
    margin-top: 0 !important;
}

/* Admin styles for post editor */
body.wp-admin.post-php,
body.wp-admin.post-new-php {
    background-color: #f0f0f1;
}

body.wp-admin.post-php .wp-admin,
body.wp-admin.post-new-php .wp-admin {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

body.wp-admin.post-php #wpcontent,
body.wp-admin.post-new-php #wpcontent {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
}

body.wp-admin.post-php #wpbody,
body.wp-admin.post-new-php #wpbody {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
}

/* Editor iframe styles for post editor */
.block-editor-iframe__body.editor-styles-wrapper {
    max-width: 1280px !important;
    margin: 0 auto !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) !important;
}

/* Editor content wrapper */
.editor-visual-editor__post-title-wrapper,
.is-root-container.is-desktop-preview {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* Global blockquote styles */
blockquote {
    border-left: 4px solid #3356cc;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    font-style: italic;
    position: relative;
}

blockquote p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #3356cc;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
}

blockquote::after {
    content: '"';
    font-size: 3rem;
    color: #3356cc;
    position: absolute;
    bottom: -1.5rem;
    right: 1rem;
    font-family: serif;
}

/* Global link styles for single posts */
.single-post .wp-block-post-content a {
    color: #0000EE !important;
    text-decoration: none !important;
    transition: text-decoration 0.2s ease;
}

.single-post .wp-block-post-content a:hover {
    text-decoration: underline !important;
}

@media (max-width: 768px) {
    .single-post .wp-block-post-content a {
        text-decoration: underline !important;
    }
}

@media (max-width: 480px) {
    .single-post .wp-block-post-content a {
        text-decoration: underline !important;
    }
}
