/*
Theme Name: GRU Gemnic Plugin
Theme URI: https://example.com/
Author: Antigravity
Description: A high-fidelity pixel-perfect clone of the GRU Gemnic website.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gru-gemnic-plugin
*/

/* --- Design Tokens --- */
:root {
    --color-crimson: #ff3366;
    --color-crimson-dark: #ff1a53;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-bg-light: #f3f4f4;
    --color-ink: #1b1b1b;
    --color-gray: #c4c5c6;
    
    --font-serif: "Playfair Display", Georgia, serif;
    --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
    
    --spacer-8: 0.5rem;
    --spacer-16: 1rem;
    --spacer-24: 1.5rem;
    --spacer-40: 2.5rem;
    --spacer-64: 4rem;
    
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    --container-max-width: 1260px;
}

/* --- Global Reset --- */
.wp-theme-core *, .wp-theme-core *::before, .wp-theme-core *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    line-height: 1.5;
    color: var(--color-ink);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* Scope the theme's serif font family exclusively to standard theme containers */
.site-header h1, .site-header h2, .site-header h3,
.site-footer h1, .site-footer h2, .site-footer h3,
.b-hero h1, .b-hero h2, .b-hero h3,
.b-news h1, .b-news h2, .b-news h3,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6,
.site-main h1, .site-main h2, .site-main h3, .site-main h4, .site-main h5, .site-main h6,
.post h1, .post h2, .post h3, .post h4, .post h5, .post h6,
.page h1, .page h2, .page h3, .page h4, .page h5, .page h6,
.widget h1, .widget h2, .widget h3, .widget h4, .widget h5, .widget h6 {
    font-family: var(--font-serif);
}

/* Scope link resets to theme components to avoid styling conflict with external plugins */
.wp-theme-core .site-header a,
.wp-theme-core .site-footer a,
.wp-theme-core .site-nav a,
.wp-theme-core .b-hero a,
.wp-theme-core .b-news a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Scope list resets to theme components to avoid styling conflict with external plugins */
.wp-theme-core .site-header ul,
.wp-theme-core .site-footer ul,
.wp-theme-core .site-nav ul,
.wp-theme-core .shortcuts-menu ul,
.wp-theme-core .b-news ul {
    list-style: none;
}

/* Scope responsive image styles without forcing block display on inline elements of other plugins */
.wp-theme-core img {
    max-width: 100%;
    height: auto;
}

.wp-theme-core .site-header img,
.wp-theme-core .site-footer img,
.wp-theme-core .b-hero img,
.wp-theme-core .b-news img {
    display: block;
}

.u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Layout --- */
.l-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacer-24);
}

/* --- Typography Helpers --- */
.h3 { font-size: 2.25rem; }
.p { font-size: 1.125rem; }

/* --- Buttons (.a-btn) --- */
.a-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    cursor: pointer;
}

.a-btn-primary {
    background-color: var(--color-white);
    color: var(--color-black);
}

.a-btn-primary:hover {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.a-btn--arrow-right .icon-arrow-right {
    margin-left: var(--spacer-8);
    transition: transform 0.3s ease;
}

.a-btn--arrow-right:hover .icon-arrow-right {
    transform: translateX(5px);
}

/* --- Header System --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
    background: transparent;
    transition: background 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(0, 0, 0, 0.95);
}

.site-header__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacer-24);
}

.nav-hot-links {
    background: var(--color-ink);
    color: var(--color-white);
    text-align: right;
    padding: var(--spacer-8) var(--spacer-24);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-hot-links a {
    color: var(--color-white);
}

.nav-hot-links a:hover {
    text-decoration: underline;
}

.site-header__brand-inner {
    display: flex;
    align-items: center;
    height: 80px;
    width: 100%;
    justify-content: space-between;
}

.logo svg {
    height: 36px;
    fill: var(--color-white);
}

.site-triggers {
    display: flex;
    gap: var(--spacer-16);
    color: var(--color-white);
}

.site-trigger {
    background: none;
    border: none;
    color: inherit;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacer-8);
}

/* --- Drawer (Mega Menu Placeholder) --- */
.site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: var(--color-white);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    padding: var(--spacer-64) var(--spacer-24);
}

.site-nav.is-open {
    transform: translateX(0);
}

.site-nav__close {
    position: absolute;
    top: var(--spacer-24);
    right: var(--spacer-24);
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* --- Hero Section (.b-hero) --- */
.b-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-white);
    background-color: var(--color-crimson);
}

.b-hero__media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.b-hero__media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(165,28,48,0.7) 100%);
}

.c-image__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.b-hero__title {
    font-size: 2.2rem !important;
    font-size: clamp(1.8rem, 2.5vw, 2.4rem) !important;
    white-space: nowrap !important;
    letter-spacing: -0.025em !important;
    overflow: visible !important;
    text-overflow: clip !important;
    margin-bottom: var(--spacer-24);
}

.b-hero__bottom-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    background: var(--color-white);
    z-index: 2;
}

/* --- News Section (.b-news) Split Layout --- */
.b-news {
    background-color: var(--color-bg-light);
    padding-top: var(--spacer-64);
    padding-bottom: var(--spacer-64);
}

.b-news__wrap {
    display: flex;
    gap: var(--spacer-40);
    flex-wrap: wrap;
}

.b-news__left {
    flex: 1 1 55%;
}

.b-news__right {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
}

/* Left: Featured Story */
.b-news__first-img {
    margin-bottom: var(--spacer-24);
    overflow: hidden;
}

.b-news__first-img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.b-news__first-img:hover img {
    transform: scale(1.02);
}

.b-news__category {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-crimson);
    letter-spacing: 0.05em;
    margin-bottom: var(--spacer-8);
}

.b-news__first-title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacer-16);
    transition: color 0.3s ease;
}

.b-news__first-title:hover {
    color: var(--color-crimson);
}

.b-news__first-excerpt {
    font-size: 1.25rem;
    color: var(--color-ink);
}

.b-news__first-cta {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Right: Side Stories */
.b-news__side-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacer-24) 0;
    border-bottom: 1px solid var(--color-gray);
    position: relative;
}

.b-news__side-wrap:first-child {
    padding-top: 0;
}

.b-news__side-content {
    flex: 1;
    padding-right: var(--spacer-24);
}

.b-news__side-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacer-8);
    transition: color 0.3s ease;
}

.b-news__side-title:hover {
    color: var(--color-crimson);
}

.b-news__side-excerpt {
    font-size: 0.95rem;
    color: var(--color-ink);
}

.b-news__side-img {
    flex: 0 0 120px;
    height: 120px;
    overflow: hidden;
}

.b-news__side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.b-news__side-wrap:hover .b-news__side-img img {
    transform: scale(1.05);
}

.b-news__side-cta {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    opacity: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .b-hero__title {
        font-size: 1.8rem;
    }
    
    .b-news__wrap {
        flex-direction: column;
    }
}

/* --- Premium Spacing for Header (Mobile-First Safe Area Styling) --- */

/* Base Spacing / Mobile Viewports (below 768px) */
@media (max-width: 767px) {
    .site-header {
        /* Standard fallback padding + CSS environment safe area insets for modern notched phones */
        padding-top: 12px !important;
        padding-top: calc(12px + env(safe-area-inset-top)) !important;
        padding-bottom: 12px !important;
        height: auto !important;
        min-height: 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .site-header__wrapper {
        position: relative !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Lock Logo and Shortcuts Menu trigger vertically within the padded header */
    .site-header__brand {
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        padding-left: 0 !important;
        display: flex !important;
        align-items: center !important;
        z-index: 999999 !important;
    }

    .shortcuts-menu {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        z-index: 999999 !important;
    }
}

/* Tablet Viewports (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .site-header {
        padding-top: 8px !important;
        padding-top: calc(8px + env(safe-area-inset-top)) !important;
        padding-bottom: 8px !important;
        height: 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .site-header__wrapper {
        position: relative !important;
        width: 100% !important;
    }

    .site-header__brand {
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }

    .shortcuts-menu {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }
}

/* Desktop Viewports (1200px+) */
@media (min-width: 1200px) {
    .site-header {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        height: 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .site-header__wrapper {
        position: relative !important;
        width: 100% !important;
    }

    .site-header__brand {
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }

    .shortcuts-menu {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }
}

.logo {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-header__brand {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Hero content shifted down for breathing room */
.b-hero__content {
    padding-top: 80px !important;
}


/* --- High-Fidelity Responsive Hero CTA Buttons (GRU Gemnic Ghost Button System) --- */
.hero-buttons-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 32px !important;
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 960px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.hero-button-item {
    display: block !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    min-width: 0 !important;
}

.hero-button-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
    color: var(--color-white) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 3px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding: 10px 18px !important;
    height: auto !important;
    min-width: 130px !important;
    text-align: center !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 999999 !important;
    -webkit-tap-highlight-color: transparent;
}

.hero-button-link:hover,
.hero-button-link:focus {
    background-color: var(--color-white) !important;
    color: #a51c30 !important;
    border-color: var(--color-white) !important;
    transform: translateY(-2px) !important;
    outline: none !important;
}

.hero-button-text {
    display: inline-block !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    .b-hero {
        height: auto !important;
        min-height: 100vh !important;
        padding-top: calc(100px + env(safe-area-inset-top)) !important;
        padding-bottom: 60px !important;
        overflow: visible !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .b-hero__container {
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
    }
    
    .b-hero__content {
        height: auto !important;
        overflow: visible !important;
    }

    .b-hero__title {
        font-size: 4.8vw !important;
        font-size: clamp(0.85rem, 4.8vw, 1.1rem) !important;
        white-space: nowrap !important;
        letter-spacing: -0.01em !important;
        text-overflow: clip !important;
        overflow: visible !important;
        margin-bottom: 12px !important;
    }

    .hero-buttons-container {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 6px !important;
        margin-top: 24px !important;
        padding: 0 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }

    .hero-button-item {
        flex: 0 1 auto !important;
        min-width: 0 !important;
    }

    .hero-button-link {
        font-size: 0.58rem !important;
        padding: 6px 10px !important;
        min-width: unset !important;
        width: auto !important;
        letter-spacing: 0.08em !important;
        border-radius: 2px !important;
        white-space: nowrap !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .hero-buttons-container {
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        max-width: 720px !important;
        padding: 0 24px !important;
        margin-top: 32px !important;
    }

    .hero-button-item {
        width: auto !important;
    }

    .hero-button-link {
        width: auto !important;
        min-width: 140px !important;
        font-size: 0.7rem !important;
        padding: 10px 20px !important;
    }
}

@media (min-width: 1200px) {
    .hero-buttons-container {
        flex-direction: row !important;
        align-items: center !important;
        gap: 16px !important;
        max-width: 960px !important;
        padding: 0 !important;
        margin-top: 36px !important;
    }

    .hero-button-item {
        width: auto !important;
    }

    .hero-button-link {
        width: auto !important;
        min-width: 150px !important;
        font-size: 0.72rem !important;
        padding: 12px 24px !important;
    }
}
