/* 
    =========================================
    MKP Ergül OSGB - Modern Style Sheet 
    =========================================
*/

/* --- Variables & Core Theme Colors --- */
:root {
    --primary: #800000;
    /* Koyu Bordo (Kurumsal Ağır Rek) */
    --primary-light: #a42c2c;
    --primary-dark: #580000;

    --accent: #3bafbf;
    /* Turkuaz/Teal - Öne Çıkan Aktif Renk */
    --accent-hover: #2d8d9c;

    --bg-dark: #0f172a;
    /* Koyu Arka Plan (Hero / Footer vs) */
    --bg-light: #f8fafc;
    /* Açık Alt Bölüm Arkaplanı */
    --bg-glass: rgba(255, 255, 255, 0.1);

    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #f1f5f9;

    /* Typo */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Borders */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 175, 191, 0.4);
}

/* --- Base Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #1e8796 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, #1e8796 0%, var(--accent) 100%);
    color: white;
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(128, 0, 0, 0.2);
}

.btn-outline-dark {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-outline-dark:hover {
    background-color: var(--text-main);
    border-color: var(--text-main);
    color: white;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}


/* --- Top Bar / Header --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    flex-wrap: nowrap;
    overflow: visible;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state — navbar daralır, her şey smooth geçer */
.navbar.scrolled .navbar-container {
    height: 62px;
}

/* Telefon butonları: her zaman yan yana, kompakt */
.phone-buttons-group {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.phone-buttons-group .btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll'da biraz daha küçül */
.navbar.scrolled .phone-buttons-group .btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo img {
    height: 58px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-logo img {
    height: 120px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    /* makes the logo white for dark background assuming it has color */
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-item {
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    padding: 10px 14px;
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: flex-start;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition);
    line-height: 1.4;
}

.dropdown-content a i {
    margin-top: 3px;
    flex-shrink: 0;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--accent);
    padding-left: 25px;
}

.nav-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    background-color: var(--bg-dark);
    /* Later we can replace background with actual compressed photo */
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(128, 0, 0, 0.5), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 56px;
    color: white;
    margin-bottom: 25px;
    animation: fadeUp 1s ease-out;
}

.gradient-text {
    background: linear-gradient(135deg, #3bafbf, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 19px;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 650px;
    animation: fadeUp 1s ease-out 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 80px;
    animation: fadeUp 1s ease-out 0.4s backwards;
}

/* Info Cards - Glassmorphism */
.hero-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    animation: fadeUp 1s ease-out 0.6s backwards;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.info-card .info-icon {
    font-size: 30px;
    color: var(--accent);
}

.info-card h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 5px;
}

.info-card p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
}

/* --- Partners Marquee Section --- */
.partners-section {
    background-color: var(--bg-light);
    padding: 60px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.partners-header {
    text-align: center;
    margin-bottom: 35px;
}

.partners-header p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.marquee-wrapper {
    display: flex;
    overflow: hidden;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    animation: scrollMarquee 50s linear infinite;
    gap: 80px;
    align-items: center;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.partner-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #94a3b8;
    font-size: 24px;
    font-family: var(--font-heading);
    font-weight: 700;
    transition: var(--transition);
    filter: grayscale(70%);
    opacity: 0.85;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    color: var(--accent);
}

.partner-logo i {
    font-size: 32px;
}

.partner-logo span {
    white-space: nowrap;
}

/* --- Services Overview --- */
.services-overview {
    padding: 120px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 14px;
}

.section-title {
    font-size: 42px;
}

.section-title .highlight {
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card.dense {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card.dense .card-title {
    font-size: 16px;
    margin-bottom: 0;
}

.service-card.dense .card-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
    margin-bottom: 15px;
}

.service-card:hover {
    background: white;
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 175, 191, 0.2);
    transform: translateY(-10px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(128, 0, 0, 0.05), rgba(59, 175, 191, 0.1));
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.card-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.card-text {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
}

.card-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-link:hover {
    color: var(--primary);
}


/* --- About Section --- */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

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

.about-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
}

.about-img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: linear-gradient(135deg, var(--accent) 0%, #1e8796 100%);
    color: white;
    padding: 30px;
    border-radius: 50%;
    width: 160px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-glow);
    border: 8px solid var(--bg-light);
}

.exp-number {
    font-size: 42px;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
}

.exp-text {
    font-size: 16px;
    font-weight: 500;
}

.about-content {
    padding-right: 20px;
}

.about-text {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 20px;
}

.about-list {
    margin: 30px 0;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
}

.about-list li i {
    color: var(--accent);
    font-size: 20px;
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 60px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cta-text h2 {
    color: white;
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-text p {
    color: #f1f5f9;
    font-size: 18px;
}

/* --- Footer --- */
.footer {
    background-color: var(--bg-dark);
    color: #cbd5e1;
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo .logo-text {
    color: white;
}

.footer-desc {
    margin: 20px 0 30px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-title {
    color: white;
    font-size: 20px;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.footer-contact li i {
    color: var(--accent);
    margin-top: 5px;
}

.footer-contact a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.legal-links a {
    color: #cbd5e1;
}

.legal-links a:hover {
    color: var(--accent);
}

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-banner--hide {
    opacity: 0;
    transform: translateY(20px);
}

.cookie-banner__content {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner a {
    color: #7dd3fc;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* --- Responsive Helpers --- */
@media (max-width: 992px) {

    .about-grid,
    .cta-container {
        flex-direction: column;
        text-align: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding-right: 0;
        margin-top: 40px;
    }

    .about-list li {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .services-grid,
    .hero-info-cards {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 40px;
    }

    .cta-text h2 {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now, needs proper mobile menu */
    }

    .nav-buttons {
        display: none;
    }
}

/* --- Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 40px));
    }
}

/* --- Responsive & Mobile First Adjustments --- */
@media (max-width: 992px) {

    /* Navbar specific */
    .navbar-container {
        height: 80px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: transparent;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
    }

    .dropdown.active .dropdown-content {
        display: block;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .nav-buttons {
        display: none;
    }

    .nav-buttons-mobile {
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        padding: 10px 20px;
        margin-top: 10px;
        border-top: 1px solid var(--bg-light);
    }

    .nav-buttons-mobile .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-buttons-mobile .dropdown-content {
        position: relative;
        top: 0;
        box-shadow: none;
        background: var(--bg-light);
        margin-top: 10px;
        padding: 0;
        display: none;
    }

    .nav-buttons-mobile .dropdown:hover .dropdown-content {
        display: block;
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        color: var(--primary);
        cursor: pointer;
    }

    /* Grids & Layout Overrides */
    .container[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .about-grid,
    .stats-grid,
    .values-grid,
    .footer-grid,
    div[style*="grid-template-columns"],
    section[style*="grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Typography Overrides */
    .hero-title {
        font-size: 32px !important;
    }

    h1[style*="font-size: 42px"],
    h2[style*="font-size: 36px"],
    h2[style*="font-size: 32px"] {
        font-size: 28px !important;
    }

    .page-header {
        padding: 120px 0 40px !important;
    }

    /* Helper container fixes */
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

/* Extra Deep Mobile Responsiveness Fixes */
@media (max-width: 992px) {

    /* Prevent horizontal scroll globally */
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    html {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix logo size on mobile */
    .brand-logo img {
        height: 50px !important;
        max-width: 100%;
        object-fit: contain;
        margin-top: 5px;
    }

    /* Fix Hero buttons side-by-side issue */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Fix long headings overflowing */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .section-title {
        word-wrap: break-word;
        hyphens: auto;
    }

    .hero-title {
        font-size: 26px !important;
        line-height: 1.3;
    }

    .hero-content {
        padding: 0 15px;
    }

    /* Contact Page Information Wrap */
    .contact-info .info-item {
        word-break: break-all;
    }
}

/* The Ultimate Zero-Flaw Mobile Fix */
@media (max-width: 992px) {

    /* Prevent absolutely ANY side scrolling and fix padding pushes */
    html,
    body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden !important;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    * {
        box-sizing: border-box !important;
    }

    /* Container fixes so they don't break viewport */
    .container {
        width: 100%;
        max-width: 100vw;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden;
    }

    /* Hero Buttons specific fix (it was .hero-actions, not .hero-buttons) */
    .hero-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .hero-actions .btn {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
        font-size: 16px !important;
    }

    /* Sub-page Specific Fix: Service Content overflowing 320px */
    .service-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Typography fixes for word splitting on 320px screens */
    h1,
    h2,
    .section-title,
    .hero-title {
        font-size: 24px !important;
        /* Smaller baseline for tiny screens */
        word-break: break-word !important;
        hyphens: auto !important;
    }

    .page-header h1 {
        font-size: 26px !important;
    }

    /* Fix to close the gap between Logo and Hamburger */
    .navbar-container {
        padding: 0 10px !important;
        /* Tighter padding on tiny screens */
    }

    .menu-toggle {
        margin-right: 5px;
        /* Pull it slightly to right */
    }

    /* Ensure images never surpass screen width */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Specific to iPhone SE / Galaxy Fold (under 360px widths) */
@media (max-width: 360px) {
    .brand-logo img {
        height: 40px !important;
        /* Even smaller logo */
    }

    .hero-title {
        font-size: 22px !important;
    }

    .btn {
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
}

/* --- Responsive UX Revamp (Final Overrides) --- */
.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(128, 0, 0, 0.2);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #fff;
}

.menu-toggle:focus-visible,
.nav-item:focus-visible,
.btn:focus-visible,
.dropdown-content a:focus-visible,
.footer a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.footer-links,
.footer-contact {
    word-break: break-word;
}

@media (max-width: 1200px) {
    .navbar-container {
        height: 84px;
    }

    .nav-item {
        padding: 10px 9px;
        font-size: 13px;
    }

    .nav-buttons .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .phone-buttons-group .btn {
        font-size: 12px !important;
        padding: 7px 10px !important;
    }

    .footer-grid {
        grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
        gap: 26px;
    }
}

@media (max-width: 992px) {
    body.menu-open {
        overflow: hidden;
    }

    .navbar {
        backdrop-filter: blur(10px);
    }

    .navbar-container {
        height: 76px !important;
        padding: 0 14px !important;
        gap: 10px;
    }

    .navbar.scrolled .navbar-container {
        height: 68px !important;
    }

    .brand-logo img {
        height: 48px !important;
    }

    .menu-toggle {
        display: inline-flex !important;
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed !important;
        top: 76px !important;
        left: 0;
        right: 0;
        height: calc(100vh - 76px);
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        background: #fff !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        padding: 14px 14px 28px !important;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px !important;
        z-index: 999;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 12px !important;
        border-radius: 10px;
        font-size: 15px;
        background: var(--bg-light);
    }

    .nav-item::after {
        display: none;
    }

    .nav-buttons {
        display: none !important;
    }

    .nav-buttons-mobile {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        border-top: 1px solid #e2e8f0;
        margin-top: 8px;
        padding: 12px 2px 0;
    }

    .nav-buttons-mobile .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 14px !important;
    }

    .phone-buttons-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }

    .phone-buttons-group .btn {
        width: 100%;
        justify-content: center;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static !important;
        display: none !important;
        visibility: visible;
        opacity: 1;
        transform: none;
        min-width: 0;
        margin-top: 6px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: none;
        background: #fff;
        padding: 6px 0 !important;
    }

    .dropdown.active .dropdown-content {
        display: block !important;
    }

    .dropdown-content a {
        padding: 10px 12px !important;
        font-size: 14px;
        align-items: center;
    }

    .dropdown-content a:hover {
        padding-left: 12px !important;
    }

    .hero-section {
        min-height: auto;
        padding: 130px 0 70px !important;
        background-attachment: scroll;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 !important;
    }

    .hero-title {
        font-size: 32px !important;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .hero-actions {
        margin-bottom: 30px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .info-card {
        padding: 18px;
        gap: 14px;
    }

    .services-overview,
    .about-section,
    .cta-section {
        padding: 72px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .cta-container {
        padding: 26px;
        border-radius: 16px;
        gap: 20px;
    }

    .cta-text h2 {
        font-size: 26px !important;
    }

    .page-header {
        padding: 120px 0 50px !important;
    }

    .page-header h1 {
        font-size: 32px !important;
        line-height: 1.2;
    }

    .footer {
        padding-top: 54px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
        margin-bottom: 30px;
    }

    .footer-col {
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-logo img {
        height: 88px;
    }

    .footer-title {
        margin-bottom: 14px;
        font-size: 18px;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-contact li {
        margin-bottom: 12px;
    }

    .bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }

    .container[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    div[style*="display: flex; gap: 20px"] {
        flex-direction: column !important;
    }

    section div[style*="display: flex; gap"] {
        flex-direction: column !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .hero-title {
        font-size: 28px !important;
    }

    .section-title {
        font-size: 26px !important;
    }

    .btn,
    .btn-large {
        min-height: 44px;
        font-size: 14px !important;
        padding: 10px 16px !important;
    }

    .footer-contact li {
        align-items: flex-start;
        gap: 10px;
    }

    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 14px;
    }

    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cookie-banner__actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Mobile Overflow Guard Rails --- */
@media (max-width: 992px) {
    section .container,
    .page-header .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Prevent long text blocks from touching screen edges */
    p,
    li,
    a,
    h1,
    h2,
    h3,
    h4 {
        overflow-wrap: anywhere;
    }

    /* Biz Kimiz ve benzerlerinde mutlak konumlu bilgi karti tasmasini engelle */
    div[style*="position: absolute"][style*="left: -30px"] {
        left: 12px !important;
        right: 12px !important;
        max-width: calc(100% - 24px) !important;
        padding: 14px !important;
        gap: 10px !important;
    }

    /* Mobilde asiri buyuk inline paddings gorunumu bozmasin */
    div[style*="padding: 40px"] {
        padding: 22px !important;
    }

    div[style*="padding: 30px"] {
        padding: 18px !important;
    }

    /* Sayfa basligi bolumlerinde yatay kirpmayi engelle */
    .page-header {
        overflow: hidden;
    }

    /* Ana sayfada ikonlu madde listesini mobilde sola hizala */
    .about-section .about-content {
        text-align: left !important;
    }

    .about-section .about-list li {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container,
    section .container,
    .page-header .container {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .btn,
    .btn-large {
        border-radius: 14px;
    }
}

/* Final mobile QA hardening */
@media (max-width: 992px) {
    /* Sticky side CTAs can create awkward jumps on small screens */
    div[style*="position: sticky"] {
        position: static !important;
        top: auto !important;
    }

    /* Keep dropdown panels inside viewport on narrow screens */
    .nav-links .dropdown-content {
        min-width: 0 !important;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Contact map is too tall on small screens */
    iframe {
        min-height: 320px;
    }

    /* Improve tap comfort on the hamburger trigger */
    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}