/* Responsive Fixes for Century Laboratuvarı */

/* Helper Classes */
@media (max-width: 991px) {
    .hidden-lg-down {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .hidden-xl-up {
        display: none !important;
    }
}

/* Hamburger Menu Tweak */
.aa-site-header__hamburger {
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
    text-decoration: none;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
}

.aa-hamburger {
    width: 30px;
    height: 20px;
    position: relative;
}

.aa-hamburger span,
.aa-hamburger span::before,
.aa-hamburger span::after {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.aa-hamburger span {
    top: 50%;
    transform: translateY(-50%);
}

.aa-hamburger span::before {
    content: "";
    top: -8px;
}

.aa-hamburger span::after {
    content: "";
    bottom: -8px;
}

/* Active State for Hamburger */
.is-active .aa-hamburger span {
    background-color: transparent;
}

.is-active .aa-hamburger span::before {
    top: 0;
    transform: rotate(45deg);
}

.is-active .aa-hamburger span::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Navigation Overlay */
@media (max-width: 1199px) {
    body.js-nav-open {
        overflow: hidden; /* Prevent background scroll */
    }

    /* Only hide desktop nav when explicitly flagged with hidden-lg-down */
    .aa-navigation-container.hidden-lg-down,
    .aa-navigation-some-wrapper.hidden-lg-down {
        display: none !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* General Responsiveness */
img {
    max-width: 100%;
    height: auto;
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
}

.row-fluid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

/* Hero Section Responsiveness */
@media (max-width: 768px) {
    .aa-hero {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
        height: auto !important;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .aa-hero__header h1 {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .aa-hero__header h3 {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .aa-hero__body {
        margin-top: 30px !important;
    }

    .aa-button-group {
        flex-direction: column;
        width: 100%;
    }

    .aa-button {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* Column Case Responsiveness */
@media (max-width: 991px) {
    .aa-columns-case {
        flex-direction: column !important;
        margin-bottom: 40px !important;
    }

    .aa-columns-case--image,
    .aa-columns-case--text {
        width: 100% !important;
        padding: 0 !important;
    }

    .aa-columns-case--text {
        margin-top: 20px !important;
    }
}

/* Info Cards Grid */
.aa-info-cards__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .aa-info-cards__body {
        grid-template-columns: 1fr;
    }
}

/* Article Cards Grid */
.aa-article-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

@media (max-width: 600px) {
    .aa-article-cards-container {
        grid-template-columns: 1fr;
    }
}

/* Basic Grid for non-Bootstrap pages */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 5px;
    }
}

/* Info Card Adjustments */
.aa-info-card {
    height: auto !important;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    background: #fff;
}

.aa-info-card__header {
    margin-bottom: 15px;
    text-align: center;
}

.aa-info-card__body h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1b4294;
}

.video-overlay .watch-on-fb {
    margin-top: 15px;
    font-size: 14px;
    color: #fff;
    text-decoration: underline;
    z-index: 1;
}

/* Video Responsiveness and Styling */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-container .fallback, 
.video-container .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
}

.video-container .fallback {
    background-color: #f2f2f2;
    color: #333;
    display: none; /* Hidden by default */
}

.video-container .video-overlay {
    cursor: pointer;
    background: rgba(0,0,0,0.4);
    transition: background 0.3s ease;
}

.video-container .video-overlay:hover {
    background: rgba(0,0,0,0.6);
}

.video-overlay p {
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.play-button {
    width: 70px;
    height: 70px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.video-overlay:hover .play-button {
    transform: scale(1.1);
}

.play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent #0098da;
    margin-left: 5px;
}

.video-overlay .watch-on-fb {
    margin-top: 20px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.video-overlay .watch-on-fb:hover {
    background: #0098da;
    border-color: #0098da;
}

/* Form Visibility Fix */
#help-form {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.aa-form .aa-inner {
    opacity: 1 !important;
    transform: none !important;
}

/* Ensure body doesn't overflow horizontally */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}
