
/* ========================================
   OPRAVA FARIEB - INVERSE SECTION (ZELENÁ)
   ======================================== */

.section.inverse-section {
    background-color: #112a24 !important;
    background-image: linear-gradient(0deg, #112a24e6, #112a241a) !important;
}

.section.utility-overflow-clip.inverse-section {
    background-color: #112a24 !important;
    background-image: linear-gradient(0deg, #112a24e6, #112a241a) !important;
}

.inverse-section h1,
.inverse-section h2,
.inverse-section h3,
.inverse-section p,
.inverse-section .paragraph-lg,
.inverse-section .eyebrow {
    color: #ffffff !important;
}

.inverse-section .utility-text-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Hero header uses light background, keep dark headline color */
.section.top .heading-responsive-xl,
.section.top .heading-responsive-xl.utility-margin-bottom-0 {
    color: var(--text-color-accent-primary) !important;
}

/* ========================================
   HERO SECTION - LAYOUT A VÝŠKA
   ======================================== */

.section.top {
    position: relative;
    overflow: hidden;
}

.section.top .grid-layout {
    min-height: 724px;
    display: grid;
    align-items: center;
}

@media screen and (max-width: 991px) {
    .section.top .grid-layout {
        min-height: auto;
        grid-template-columns: 1fr;
    }
}

.div-block-2 {
    position: relative;
    z-index: 1;
    height: 100%;
}

@media screen and (max-width: 991px) {
    .div-block-2 {
        height: auto;
        min-height: 400px;
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fcf4e8; /* Match the background of the text container */
    }
    
    .div-block-2 .cover-image {
        position: relative;
        object-fit: contain;
        height: auto;
        max-height: 400px;
    }
}

.container.back {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 724px;
}

@media screen and (max-width: 991px) {
    .container.back {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
        order: 2;
    }
}

.section.top .utility-container-cqw {
    width: 100%;
}

.hero-text-container {
    margin-bottom: 1rem;
}

.hero-text-rotator .heading-responsive-xl {
    display: grid !important;
}

/* Fallback when container query units are not supported */
.section.top .heading-responsive-xl {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1em;
}

@supports (font-size: 1cqw) {
    .section.top .heading-responsive-xl {
        font-size: 12cqw;
    }
}

.hero-rotator-item {
    grid-area: 1 / 1;
    display: block;
    opacity: 0;
    transition: opacity 1000ms ease-out;
}

.hero-rotator-item.is-active {
    opacity: 1;
}

.tickets-hero-image {
    min-height: 360px;
}

@media screen and (max-width: 767px) {
    .tickets-hero-image {
        min-height: 240px;
    }
}

/* ========================================
   CONTACT FORM STYLING
   ======================================== */

.custom-contact-form {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #eb0028;
    box-shadow: 0 0 0 3px rgba(235, 0, 40, 0.1);
}

.form-textarea {
    resize: vertical;
}

.message-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.success-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.btn-full-width {
    width: 100%;
}

/* ========================================
   WPFORMS OVERRIDE STYLING
   ======================================== */

/* Form container */
.contact-form-section .wpforms-container {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

/* Hide default WPForms inline styles */
.contact-form-section .wpforms-container style {
    display: none;
}

/* Input fields - text, email, textarea */
.contact-form-section .wpforms-form input[type="text"],
.contact-form-section .wpforms-form input[type="email"],
.contact-form-section .wpforms-form textarea {
    width: 100% !important;
    padding: 1rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    background-color: #f8fafc !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
}

.contact-form-section .wpforms-form input[type="text"]:focus,
.contact-form-section .wpforms-form input[type="email"]:focus,
.contact-form-section .wpforms-form textarea:focus {
    outline: none !important;
    border-color: var(--core-accent-color--accent-primary, #f5ad0e) !important;
    box-shadow: 0 0 0 3px rgba(245, 173, 14, 0.15) !important;
    background-color: #fff !important;
}

.contact-form-section .wpforms-form textarea {
    min-height: 150px !important;
    resize: vertical !important;
}

/* Field containers - spacing */
.contact-form-section .wpforms-field {
    margin-bottom: 1.25rem !important;
}

/* Hide labels (placeholders are used instead) */
.contact-form-section .wpforms-field-label.wpforms-label-hide {
    display: none !important;
}

/* Show regular labels if needed */
.contact-form-section .wpforms-field-label:not(.wpforms-label-hide) {
    font-family: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--text-color-primary, #1c1b17) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* Placeholder styling */
.contact-form-section .wpforms-form input::placeholder,
.contact-form-section .wpforms-form textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Submit button - match theme button style */
.contact-form-section .wpforms-submit-container {
    margin-top: 1.5rem !important;
    text-align: center !important;
}

.contact-form-section .wpforms-submit {
    padding: 1em 2em !important;
    border: 0 !important;
    border-radius: var(--button--button-radius, 0.5rem) !important;
    background-color: var(--core-accent-color--accent-primary, #f5ad0e) !important;
    box-shadow: inset 0 0 0 2px var(--text-color-primary, #1c1b17), 4px 4px 0 0 var(--text-color-primary, #1c1b17) !important;
    font-family: inherit !important;
    color: var(--text-color-accent-primary, #1c1b17) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 200px !important;
}

.contact-form-section .wpforms-submit:hover {
    background-color: var(--core-accent-color--accent-primary-hover, #ebf55d) !important;
    box-shadow: inset 0 0 0 2px var(--text-color-primary, #1c1b17), 7px 7px 0 0 var(--text-color-primary, #1c1b17) !important;
}

.contact-form-section .wpforms-submit:active {
    background-color: var(--core-accent-color--accent-primary, #f5ad0e) !important;
    box-shadow: inset 0 0 0 2px var(--text-color-primary, #1c1b17), 2px 2px 0 0 var(--text-color-primary, #1c1b17) !important;
}

.contact-form-section .wpforms-submit:focus {
    outline: 2px solid var(--core-accent-color--accent-primary, #f5ad0e) !important;
    outline-offset: 2px !important;
}

/* Error styling */
.contact-form-section .wpforms-error,
.contact-form-section .wpforms-field input.wpforms-error,
.contact-form-section .wpforms-field textarea.wpforms-error {
    border-color: #eb0028 !important;
}

.contact-form-section .wpforms-error-container {
    color: #eb0028 !important;
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
}

/* Required asterisk */
.contact-form-section .wpforms-required-label {
    color: #eb0028 !important;
}

/* Success message */
.contact-form-section .wpforms-confirmation-container-full {
    background-color: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    text-align: center !important;
}

/* Hide honeypot fields */
.contact-form-section .wpforms-field[style*="position: absolute"],
.contact-form-section .wpforms-field[data-field-id="5"],
.contact-form-section .wpforms-field[data-field-id="4"] {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
}

/* Loading spinner alignment */
.contact-form-section .wpforms-submit-spinner {
    margin-left: 0.5rem !important;
}

/* ========================================
   OBRÁZKY - COVER-IMAGE CLASS
   ======================================== */

.cover-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.cover-image.position-relative {
    position: relative !important;
}

.hero-logo,
img[alt="TEDxRoatan Logo"],
img[alt="TEDxRoatan"] {
    max-width: 100%;
    height: auto;
    display: block;
}

.utility-link-content-block img,
.card-link img {
    object-fit: cover;
    width: 100%;
    height: auto;
    aspect-ratio: 293 / 366;
}

/* ========================================
   UTILITY CLASSES - DOPLNKY
   ======================================== */

.utility-aspect-2x3 {
    aspect-ratio: 2 / 3;
    position: relative;
    overflow: hidden;
}

.utility-aspect-3x4 {
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
}

.utility-aspect-9x16 {
    aspect-ratio: 9 / 16;
    position: relative;
    overflow: hidden;
}

.utility-aspect-10x16 {
    aspect-ratio: 10 / 16;
    position: relative;
    overflow: hidden;
}

.utility-aspect-1x1 {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.utility-aspect-3x2 {
    aspect-ratio: 3 / 2;
    position: relative;
    overflow: hidden;
}

/* Specific fix for About section video on mobile */
@media screen and (max-width: 991px) {
    .card-on-inverse .utility-aspect-3x2 {
        aspect-ratio: auto;
        height: auto;
    }
}

.utility-max-width-70 {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.utility-max-width-90 {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   YOUTUBE VIDEO EMBED
   ======================================== */

.youtube {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   CARD LINKS - HOVER EFFECTS
   ======================================== */

.utility-link-content-block,
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.utility-link-content-block:hover,
.card-link:hover {
    opacity: 0.9;
}

/* ========================================
   OVERLAY A BACKGROUNDS
   ======================================== */

.utility-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Hide lightbox descriptions globally */
.gslide-description,
.gslide-description.description-bottom {
    display: none !important;
}

/* Speaker featured image sizing */
.speaker-detail-grid {
    grid-template-columns: minmax(0, 352px) minmax(0, 1fr);
    align-items: start;
}

.speaker-featured-thumb {
    width: 100%;
}

@media screen and (max-width: 991px) {
    .speaker-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Match gallery thumbnails to featured photo size */
.speaker-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(352px, 352px));
    justify-content: start;
}

@media screen and (max-width: 991px) {
    .speaker-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Speakers carousel */
.speakers-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.speakers-carousel-viewport {
    overflow: hidden;
    width: 484px; /* 4 images (103px) + 3 gaps (24px) = 484px */
    max-width: 100%;
    position: relative;
}

.speakers-carousel-track {
    --carousel-gap: 24px;
    display: flex;
    gap: var(--carousel-gap);
    scroll-behavior: smooth;
}

.speakers-carousel-track > a {
    flex: 0 0 103px;
}

.speakers-carousel-track > a img {
    width: 100%;
    height: auto;
}

.speakers-carousel .carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    min-width: 0;
    line-height: 1;
}

.speakers-carousel .carousel-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.speakers-carousel .carousel-arrow-icon {
    width: 16px;
    height: 16px;
}

.speakers-carousel .carousel-arrow-icon {
    transform: rotate(-90deg);
}

.speakers-carousel .carousel-arrow-icon.is-prev {
    transform: rotate(90deg);
}

@media screen and (max-width: 991px) {
    .speakers-carousel-track > a {
        flex: 0 0 103px;
    }
}

/* Speakers & Team carousel layout update */
.section.secondary-section .grid-layout.desktop-3-column-span-2 {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.section.secondary-section .grid-layout.desktop-3-column-span-2 > div:first-child {
    grid-column: span 1;
}

.section.secondary-section .grid-layout.desktop-3-column-span-2 > .speakers-carousel {
    grid-column: span 1;
}

@media screen and (max-width: 991px) {
    .section.secondary-section .grid-layout.desktop-3-column-span-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media screen and (max-width: 767px) {
    .section.secondary-section .grid-layout.desktop-3-column-span-2 {
        display: block; /* Stack rows vertically */
    }

    .section.secondary-section .grid-layout.desktop-3-column-span-2 > div:first-child {
        margin-bottom: 2rem;
        text-align: center;
    }

    .speakers-carousel {
        gap: 0.5rem;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .speakers-carousel-viewport {
        flex: 1;
        overflow: hidden;
    }

    .speakers-carousel-track > a {
        flex: 0 0 100%; /* Show exactly 1 image like the gallery */
        max-width: 100%;
    }

    .speakers-carousel .carousel-arrow {
        padding: 0.4rem;
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .speakers-carousel .carousel-arrow-icon {
        width: 12px;
        height: 12px;
    }
}

/* Gallery carousel */
.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-carousel-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.gallery-carousel-track {
    --gallery-gap: 24px;
    display: flex;
    align-items: center;
    gap: var(--gallery-gap);
    padding: 1.5rem 0;
    width: max-content;
    will-change: transform;
}

.gallery-carousel-item {
    flex: 0 0 calc((100% - (var(--gallery-gap) * 2)) / 3);
    min-width: 280px;
    height: 350px; /* Added fixed height */
    display: block;
    transform: scale(0.8);
    opacity: 0.6;
    transition: transform 500ms ease, opacity 500ms ease;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
}

@media screen and (min-width: 1200px) {
    .gallery-carousel-item {
        flex: 0 0 380px;
        height: 450px; /* Larger fixed height for desktop */
    }
}

.gallery-carousel-item.is-center {
    transform: scale(1.1);
    opacity: 1;
}

.gallery-carousel-item img {
    width: 100%;
    height: 100%; /* Changed to 100% */
    object-fit: cover; /* Show only chunk/part of the photo */
    display: block;
    border-radius: 12px;
}

.gallery-carousel .carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    min-width: 0;
    line-height: 1;
}

.gallery-carousel .carousel-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-carousel .carousel-arrow-icon {
    width: 16px;
    height: 16px;
    transform: rotate(-90deg);
}

.gallery-carousel .carousel-arrow-icon.is-prev {
    transform: rotate(90deg);
}

.gallery-cta {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

@media screen and (max-width: 991px) {
    .gallery-carousel-item {
        flex: 0 0 calc((100% - var(--gallery-gap)) / 2);
    }
}

@media screen and (max-width: 767px) {
    .gallery-carousel {
        gap: 0.5rem;
    }

    .gallery-carousel-track {
        padding: 0.5rem 0;
    }

    .gallery-carousel-item {
        flex: 0 0 calc(100% - 60px);
        min-width: 0;
        transform: scale(0.9);
        opacity: 0.5;
        height: 300px; /* Fixed height for mobile */
        background-color: transparent; 
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    }

    .gallery-carousel-item.is-center {
        transform: scale(1);
        opacity: 1;
    }

    .gallery-carousel .carousel-arrow {
        padding: 0.4rem;
        flex: 0 0 auto;
    }

    .gallery-carousel .carousel-arrow-icon {
        width: 12px;
        height: 12px;
    }
}

.ix-full-screen-background {
    position: relative;
    width: 100%;
    height: 100%;
}

.overlay.phoneoptim {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(17, 42, 36, 0.9), rgba(17, 42, 36, 0.1));
}

/* ========================================
   GRID LAYOUTS - PRESNÉ MEDZERY
   ======================================== */

.grid-gap-xs {
    gap: 0.5rem;
}

.grid-gap-sm {
    gap: 1rem;
}

.grid-gap-md {
    gap: 2rem;
}

.grid-gap-lg {
    gap: 3rem;
}

.grid-gap-xxl {
    gap: 4rem;
}

/* ========================================
   GALLERY PAGE GRID
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-grid-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    transition: opacity 300ms ease;
    aspect-ratio: 1 / 1; /* Force square aspect ratio */
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Show chunk of photo */
    display: block;
}

.gallery-grid-item:hover {
    opacity: 0.9;
}

@media screen and (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 479px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .cover-image {
        position: relative;
        height: auto;
    }
    
    .utility-link-content-block img {
        aspect-ratio: 1 / 1;
    }
    
    .utility-max-width-70 {
        max-width: 95%;
    }
    
    .utility-max-width-90 {
        max-width: 100%;
    }
}

/* ========================================
   TEXT ALIGNMENT
   ======================================== */

.text-align-center {
    text-align: center;
}

.justify-center {
    justify-content: center;
}

/* ========================================
   PLACEHOLDER CONTENT STYLING
   ======================================== */

.placeholder-content {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
}

.placeholder-content h2 {
    margin-bottom: 1rem;
}

.placeholder-content p {
    color: #666;
}

/* Sponsors Section Styles */
.sponsors-section {
    background-color: var(--background-white);
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-top: 1px solid #f0f0f0;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.sponsor-item {
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.sponsor-item:hover {
    transform: translateY(-5px);
}

.sponsor-logo-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    /* Optional: box-shadow: 0 4px 6px rgba(0,0,0,0.05); */
}

.sponsor-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sponsor-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-red);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sponsor-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.sponsor-name-placeholder {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-red);
}

@media (max-width: 768px) {
    .sponsors-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    .sponsor-logo-wrapper {
        height: 100px;
    }
}

/* ========================================
   PODCAST SECTION STYLES
   ======================================== */

.podcast-card {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    border: 2px solid var(--text-color-primary) !important;
    box-shadow: 4px 4px 0 0 var(--text-color-primary) !important;
}

.podcast-card-wrapper:hover .podcast-card {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 0 var(--text-color-primary) !important;
}

.podcast-video-container {
    border: 2px solid var(--text-color-primary) !important;
    box-shadow: 4px 4px 0 0 var(--text-color-primary) !important;
    overflow: hidden;
    background-color: #000;
}

/* Instagram Embed Styles */
.video-embed-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.video-embed-container .instagram-media {
    margin: 0 auto !important;
}

/* YouTube oEmbed Responsiveness */
.video-embed-container .wp-embedded-content,
.video-embed-container iframe {
    max-width: 100% !important;
    width: 100% !important;
}

/* Reduce padding for the home video card */
.card-on-inverse.home-video-card {
    padding: 2rem !important;
}

@media screen and (max-width: 767px) {
    .card-on-inverse.home-video-card {
        padding: 1.5rem !important;
    }
}
