/*
Theme Name: Etica Ludis Custom Theme
Version: 1.0.0
Author: Antigravity
Description: Custom high-performance theme for Etica Ludis.
*/

/* ==========================================================================
   1. RESET & VARIABLE DEFINITIONS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;600&family=Roboto+Slab:wght@300;400;700&family=Roboto:wght@300;400;500;700&family=Solway:wght@400;700&family=Spectral+SC:wght@400;700&family=Telex&display=swap');

:root {
    --bg-dark: #000000;
    --bg-card: #141414;
    --bg-input: #1c1c1c;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-grey: #c0bfbd;
    --accent-gold: #d4af37;
    --accent-red: #cf2e2e;
    --page-bg: #000000; /* Default page background color */
    
    --font-heading: 'Spectral SC', serif;
    --font-subheading: 'Telex', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-quotes: 'Roboto Slab', serif;
    --font-accent: 'Solway', serif;
    
    --header-height: 80px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border: 2px solid var(--text-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-grey {
    background-color: var(--accent-grey);
    color: var(--bg-dark);
    border: 2px solid var(--accent-grey);
}

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

.btn i {
    margin-left: 10px;
    font-size: 0.8rem;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 40px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

.divider-text {
    padding: 0 20px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
}

.pattern-divider {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 20 16' fill='none' stroke='white' stroke-width='1' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cg transform='translate(-12.000000, 0)'%3E%3Cpath d='M28,0L10,18'/%3E%3Cpath d='M18,0L0,18'/%3E%3Cpath d='M48,0L30,18'/%3E%3Cpath d='M38,0L20,18'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
    height: 16px;
    width: 120px;
    margin: 0 auto;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    height: 70px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: flex-start;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: flex-start;
    height: 100%;
    z-index: 1001;
}

.logo img {
    height: 150px;
    width: auto;
    max-height: none !important;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    z-index: 1001;
    position: relative;
}

.site-header.scrolled .logo img {
    height: 115px;
    margin-top: 8px;
}

/* Nav Menu Desktop */
.nav-menu {
    display: flex;
    align-items: stretch;
    height: 100%;
    gap: 15px;
}

.nav-item,
.nav-menu .menu-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.site-header .nav-menu-wrapper .nav-menu > li > a,
.site-header .nav-menu > li > a,
.site-header .nav-link,
.nav-menu .menu-item-has-children > a,
.nav-item-has-children > a {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    position: relative;
    transition: var(--transition-smooth);
}

/* Color Hover State (No underline animation) */
.nav-link:hover,
.nav-menu > li:hover > a,
.nav-link.active,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-page-ancestor > a {
    color: var(--accent-grey);
}

/* Dropdown Menu */
.dropdown-menu,
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Invisible bridge to prevent losing hover when moving mouse down to submenu */
.dropdown-menu::before,
.nav-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-item-has-children:hover .dropdown-menu,
.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link,
.nav-menu .sub-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-accent);
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.dropdown-link:hover,
.nav-menu .sub-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-grey);
}

/* Burger Toggle Mobile */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    left: 0;
    transition: var(--transition-smooth);
}

.mobile-nav-toggle span:nth-child(1) { top: 0; }
.mobile-nav-toggle span:nth-child(2) { top: 9px; }
.mobile-nav-toggle span:nth-child(3) { top: 18px; }

.mobile-nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Back to Top Floating Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--text-primary);
    color: var(--bg-dark);
    width: 45px;
    height: 45px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-grey);
    transform: translateY(-5px);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    padding-top: var(--header-height);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
}

.hero-content {
    max-width: 715px;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(9.6px);
    -webkit-backdrop-filter: blur(9.6px);
    padding: 40px;
    border-left: 4px solid var(--text-primary);
    border-right: none;
    animation: slideInLeft 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-blockquote {
    font-family: var(--font-quotes);
    font-style: italic;
    font-weight: 300;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ==========================================================================
   5. STORY SECTION
   ========================================================================== */
.story-section {
    background-color: var(--bg-dark);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-text-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.story-subtitle {
    font-family: var(--font-accent);
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: 1px;
}

.story-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.story-squad-list {
    margin: 10px 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-squad-list li {
    position: relative;
    padding-left: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.story-squad-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.7rem;
    color: var(--accent-grey);
}

.story-media {
    position: relative;
}

.story-gallery-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.story-gallery-item img {
    transition: var(--transition-smooth);
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.story-gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   6. SPONSORS CAROUSEL SECTION
   ========================================================================== */
.sponsors-section {
    background-color: var(--bg-dark);
    position: relative;
}

.sponsors-carousel {
    padding: 20px 0;
    overflow: hidden;
}

.sponsor-card {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    padding: 20px;
    transition: var(--transition-smooth);
}

.sponsor-card img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(0.9);
    transition: var(--transition-smooth);
}

.sponsor-card:hover img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.08);
}

/* ==========================================================================
   7. SQUAD PAGE TEMPLATE
   ========================================================================== */
.page-hero {
    height: 50vh;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.single-post .page-hero,
body.single .page-hero {
    height: 35vh;
    min-height: 250px;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.57) 45%, var(--page-bg) 95%);
    z-index: 1;
}

.page-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Squad Split Hero Header */
.squad-hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.squad-hero-left,
.squad-hero-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.squad-hero-left {
    justify-content: flex-end;
}

.squad-hero-right {
    justify-content: flex-start;
}

.squad-hero-left::before,
.squad-hero-right::after {
    content: '';
    flex-grow: 1;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' overflow='visible' height='100%25' viewBox='0 0 20 16' fill='none' stroke='white' stroke-width='1' stroke-linecap='square' stroke-miterlimit='10'%3E%3Cg transform='translate(-12.000000, 0)'%3E%3Cpath d='M28,0L10,18'/%3E%3Cpath d='M18,0L0,18'/%3E%3Cpath d='M48,0L30,18'/%3E%3Cpath d='M38,0L20,18'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
}

.squad-hero-left::before {
    margin-right: 20px;
}

.squad-hero-right::after {
    margin-left: 20px;
}

.squad-hero-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-primary);
    white-space: nowrap;
}

.squad-hero-logo {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.squad-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    body.page-template-page-squadra .page-hero,
    body.page-template-page-squadra-php .page-hero,
    body.blog .page-hero,
    body.single-post .page-hero,
    body.single .page-hero {
        min-height: 400px;
        padding-top: 80px;
    }

    .squad-hero-header {
        flex-direction: column;
        gap: 15px;
    }
    .squad-hero-left,
    .squad-hero-right {
        width: 100%;
        justify-content: center;
    }
    .squad-hero-left::before,
    .squad-hero-right::after {
        display: none;
    }
    .squad-hero-text {
        font-size: 2.2rem;
    }
    .squad-hero-logo {
        width: 100px;
        height: 100px;
    }
}

/* Squad Quick Links */
.squad-links-row {
    background-color: #0b0b0b;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.squad-links-row .container {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.squad-link-btn {
    min-width: 200px;
    font-family: var(--font-subheading);
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 0;
    font-weight: 600;
}

.squad-link-btn:hover {
    background-color: var(--accent-grey);
    color: var(--bg-dark);
}

/* Grid of Cards (Staff & Players) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.person-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.person-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.person-img-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.person-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.person-card:hover .person-img-wrapper img {
    transform: scale(1.03);
}

.person-info {
    padding: 25px;
    text-align: center;
}

.person-name {
    font-family: var(--font-subheading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.person-role {
    font-size: 0.85rem;
    color: var(--accent-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.person-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.person-detail-item {
    margin-bottom: 8px;
}

.person-detail-item:last-child {
    margin-bottom: 0;
}

.person-detail-item strong {
    color: var(--text-primary);
    font-family: var(--font-subheading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 4px;
}

.person-meta {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================================================
   8. FOOTER SECTION & CONTACTS
   ========================================================================== */
.site-footer {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1;
}

.site-footer .container {
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.footer-title {
    font-family: var(--font-subheading);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 400;
}

.footer-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.footer-contact-icon {
    color: var(--text-primary);
    font-size: 1.1rem;
    width: 20px;
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.footer-contact-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-contact-text a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Social Icons */
.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.social-icon:hover {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form-container {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 12px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.02);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-checkbox-label input {
    margin-top: 3px;
}

.form-submit-btn {
    width: 33.33%;
    border: none;
    border-radius: 0;
    font-weight: 600;
}

.form-response-msg {
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.form-response-msg.success {
    color: #28a745;
    display: block;
}

.form-response-msg.error {
    color: var(--accent-red);
    display: block;
}

.footer-bottom {
    background-color: #050505;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #666666;
}

/* ==========================================================================
   9. ANIMATIONS & RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero-section {
        height: 100vh;
        min-height: 600px;
    }

    .site-header {
        height: 70px;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-dark);
        padding: 100px 40px 60px 40px;
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
    }
    
    .nav-menu-wrapper.open {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 4px;
    }
    
    .nav-item,
    .nav-menu .menu-item {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }
    
    .nav-link,
    .nav-menu > li > a,
    .nav-menu .menu-item-has-children > a,
    .nav-item-has-children > a {
        padding: 3px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
    
    .nav-link::before,
    .nav-link::after,
    .nav-menu > li > a::before,
    .nav-menu > li > a::after {
        display: none;
    }
    
    .logo {
        align-items: center;
    }
    
    .logo a {
        align-items: center;
    }
    
    .logo img {
        height: 85px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .site-header.scrolled .logo img {
        height: 75px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .dropdown-menu,
    .nav-menu .sub-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        border: none;
        box-shadow: none;
        padding: 5px 0 5px 15px;
        display: none;
    }
    
    .dropdown-link,
    .nav-menu .sub-menu a {
        text-align: left !important;
        padding: 3px 0 3px 20px !important;
        font-size: 13px !important;
        border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
        letter-spacing: 1px !important;
        color: var(--text-secondary) !important;
        white-space: normal !important;
        background-color: transparent !important;
    }
    
    .dropdown-link:hover,
    .nav-menu .sub-menu a:hover {
        color: var(--text-primary) !important;
        border-left-color: var(--text-primary) !important;
    }
    
    .nav-menu .menu-item-has-children > a.submenu-open::after,
    .nav-item-has-children > a.submenu-open::after {
        transform: rotate(180deg) !important;
    }
    
    .hero-section .container {
        justify-content: center;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        border-right: none;
        border-left: none;
        border-bottom: 4px solid var(--text-primary);
        padding: 30px 20px;
    }
    
    .story-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .squad-links-row .container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .squad-link-btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 575px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-blockquote {
        font-size: 1.1rem;
    }
    
    .story-subtitle {
        font-size: 1.6rem;
    }
    
    .contact-form-container {
        padding: 25px;
    }
    
    .form-submit-btn {
        width: 100%;
    }
}

/* Dropdown Menu Arrow Indicators */
.nav-menu .menu-item-has-children > a::after,
.nav-item-has-children > a::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: 8px;
    display: inline-block !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    transition: var(--transition-smooth);
    opacity: 0.8;
}

.nav-menu .menu-item-has-children:hover > a::after,
.nav-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

@media (max-width: 991px) {
    .nav-menu .menu-item-has-children > a::after,
    .nav-item-has-children > a::after {
        float: none;
        margin-top: 0;
    }
}

/* ==========================================================================
   PERSONA CARD — Matches the live site testimonial card layout
   ========================================================================== */

/* Section divider (title bar like live site) */
.squad-section-divider {
    position: relative;
    text-align: center;
    margin-bottom: 50px;
    padding: 20px 0;
}

.squad-section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

.squad-section-divider-text {
    position: relative;
    display: inline-block;
    background-color: var(--bg-dark);
    padding: 0 30px;
    font-family: var(--font-subheading);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.squad-roster-section .squad-section-divider-text {
    background-color: #0b0b0b;
}

/* 3-column grid (like the live site's dce-col-3) */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==========================================================================
   ELEMENTOR TESTIMONIAL — layout replica del sito live
   Struttura: [testo bio sopra] + [foto tonda sinistra | nome/ruolo destra]
   ========================================================================== */

/* Card container — colore di sfondo come il sito live */
.squad-staff-section .elementor-testimonial,
.squad-roster-section .elementor-testimonial {
    background-color: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
}

/* Testo bio (CARRIERA, ALTRI SPORT, CURIOSITA') — va SOTTO foto+nome */
.elementor-testimonial__content {
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.elementor-testimonial__text .descrizione,
.elementor-testimonial__text p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    line-height: 1.6;
}

.elementor-testimonial__text .desc,
.elementor-testimonial__text strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Footer: foto tonda + nome/ruolo in fila */
.elementor-testimonial__footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
}

/* Foto tonda — +50% rispetto all'originale */
.elementor-testimonial__image {
    flex-shrink: 0;
    width: 111px;
    height: 111px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #1a1a1a;
}

.elementor-testimonial__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 50%;
}

/* Cite: nome e ruolo */
.elementor-testimonial__cite {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-style: normal;
}

.elementor-testimonial__name {
    display: block;
    font-family: var(--font-subheading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.2;
}

.elementor-testimonial__title {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 991px) {
    .persona-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 575px) {
    .persona-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .elementor-testimonial__image {
        width: 90px;
        height: 90px;
    }
}

/* ==========================================================================
   10. SOCIETÀ PAGE CUSTOM STYLING (Direttivo & Dirigenti Grid)
   ========================================================================== */

/* Page template specific variable and background color */
body.page-template-page-societa,
body.page-template-page-societa-php {
    --page-bg: #c0bfbd;
    background-color: var(--page-bg) !important;
}

body.page-template-page-societa main#content,
body.page-template-page-societa-php main#content {
    background-color: var(--page-bg) !important;
}

/* Sections on Società page use the grey background */
body.page-template-page-societa .board-section,
body.page-template-page-societa .managers-section,
body.page-template-page-societa-php .board-section,
body.page-template-page-societa-php .managers-section {
    background-color: var(--page-bg) !important;
}

/* Custom paddings: board section (top/bottom 15px), managers section (top 50px) */
body.page-template-page-societa .board-section,
body.page-template-page-societa-php .board-section {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

body.page-template-page-societa .managers-section,
body.page-template-page-societa-php .managers-section {
    padding-top: 50px !important;
}

/* Dividers & titles colors adjusted for contrast on light background */
body.page-template-page-societa .divider-text,
body.page-template-page-societa-php .divider-text {
    color: #141414 !important;
}

body.page-template-page-societa .divider::before,
body.page-template-page-societa .divider::after,
body.page-template-page-societa-php .divider::before,
body.page-template-page-societa-php .divider::after {
    background-color: rgba(0, 0, 0, 0.15) !important;
}

body.page-template-page-societa .no-posts-found,
body.page-template-page-societa-php .no-posts-found {
    color: #333333 !important;
}

.societa-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 30px;
}

.societa-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* Black cards with padding to make photos smaller */
.societa-member-card {
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    text-align: center;
    padding: 20px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.societa-member-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.societa-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #111;
}

.societa-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition-smooth);
}

.societa-member-card:hover .societa-img-wrapper img {
    transform: scale(1.04);
}

.societa-info {
    padding: 5px 0;
}

.societa-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.societa-role {
    font-family: var(--font-subheading);
    font-size: 0.72rem;
    color: var(--text-secondary); /* Grey role text color instead of gold */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    line-height: 1.3;
}

/* Responsive Grid Adapters */
@media (max-width: 991px) {
    .societa-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .societa-grid-6 {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .societa-name {
        font-size: 0.95rem;
    }
}

@media (max-width: 575px) {
    .societa-grid-3 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .societa-grid-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .societa-member-card {
        padding: 12px;
    }
    
    .societa-img-wrapper {
        margin-bottom: 10px;
    }
    
    .societa-name {
        font-size: 0.9rem;
    }
    
    .societa-role {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   11. SQUAD & FOOTER STYLING OVERRIDES (Paddings, Title Dividers, Store Button)
   ========================================================================== */

/* Reduced padding between squad template sections */
.squad-staff-section {
    padding-top: 30px !important;
    padding-bottom: 15px !important;
}

.squad-roster-section {
    padding-top: 30px !important;
    padding-bottom: 50px !important;
}



/* Official Store Button in Footer */
.btn-store {
    background-color: var(--text-primary) !important;
    color: var(--bg-dark) !important;
    border: 2px solid var(--text-primary) !important;
    font-family: var(--font-subheading) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    padding: 10px 20px !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.btn-store:hover {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--text-primary) !important;
}

/* ==========================================================================
   12. TROPHIES PAGE CUSTOM STYLING
   ========================================================================== */
.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 45px;
}

.trophy-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: var(--bg-card);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.trophy-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .trophies-grid {
        gap: 25px;
    }
    .trophy-box {
        padding: 20px;
        gap: 15px;
    }
}

/* ==========================================================================
   13. SPONSORS PAGE CUSTOM STYLING
   ========================================================================== */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.sponsor-card-box {
    background-color: var(--bg-card);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    padding: 25px;
    transition: var(--transition-smooth);
}

.sponsor-card-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sponsor-card-box img {
    max-height: 120px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(0.9);
    transition: var(--transition-smooth);
}

.sponsor-card-box:hover img {
    filter: grayscale(0) brightness(1) !important;
    transform: scale(1.06);
}

/* ==========================================================================
   14. SINGLE POST PAGE CUSTOM STYLING
   ========================================================================== */
.post-navigation-links {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.prev-post-link {
    max-width: 45%;
}

.next-post-link {
    max-width: 45%;
    text-align: right;
}

.prev-post-link a,
.next-post-link a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    line-height: 1.4;
    display: block;
}

.prev-post-link span,
.next-post-link span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .post-navigation-links {
        flex-direction: column;
        gap: 25px;
    }
    .prev-post-link,
    .next-post-link {
        max-width: 100%;
        text-align: left;
    }
}

/* ==========================================================================
   15. NEWS / BLOG ARCHIVE CUSTOM STYLING
   ========================================================================== */
.news-card {
    display: flex;
    flex-direction: column;
}

.news-img-wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
}

.news-info .post-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.post-card-title {
    font-family: var(--font-subheading);
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.post-card-title a {
    color: var(--text-primary);
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.news-info .read-more-link {
    font-family: var(--font-subheading);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
}

@media (max-width: 575px) {
    .news-info {
        padding: 15px;
    }
}
