/* ============================================
   FIRE & POWER - FIXES & OVERRIDES
   Ek düzeltmeler ve iyileştirmeler
   ============================================ */

/* Container width fixes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Overflow prevention */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

/* Image fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Form control fixes */
.form-control,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
}

/* Button width fixes on mobile */
@media (max-width: 768px) {
    .btn-submit,
    .form-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Grid system fixes */
.features-grid,
.programs-grid,
.stats-grid,
.gallery-grid,
.form-grid {
    width: 100%;
}

/* Card overflow fixes */
.card,
.feature-card,
.program-card,
.stat-card,
.info-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Navbar positioning fix */
.navbar {
    width: 100%;
    left: 0;
    right: 0;
}

/* Hero section min-height fix */
.hero {
    min-height: 100vh;
}

@media (max-width: 768px) {
    .hero {
        min-height: 85vh;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
    }
}

/* Text overflow fixes */
.hero-title,
.section-title,
.program-title,
.feature-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Flexbox alignment fixes */
.nav-wrapper,
.hero-buttons,
.stat-item,
.feature-item,
.info-card {
    align-items: center;
}

/* Z-index management */
.navbar {
    z-index: 1000;
}

.hamburger.active {
    z-index: 1001;
}

.nav-menu {
    z-index: 999;
}

.preloader {
    z-index: 99999;
}

.back-to-top {
    z-index: 998;
}

.gallery-overlay {
    z-index: 2;
}

/* Smooth transitions */
* {
    transition-property: transform, opacity, background, color, border-color, box-shadow;
}

a,
button,
.btn,
.nav-link {
    transition: all 0.3s ease;
}

/* Focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #FFD700;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Disabled states */
.btn:disabled,
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Glassmorphism effect fix */
.glass,
.navbar,
.registration-form,
.contact-form,
.program-card,
.feature-card,
.info-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Gradient text fix for Safari */
.text-gradient,
.logo,
.hero-title,
.section-title,
.stat-number {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Aspect ratio fix */
.aspect-ratio-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.aspect-ratio-16-9 > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animation performance */
@media (prefers-reduced-motion: no-preference) {
    .hero-shape {
        will-change: transform, opacity;
    }

    .stat-item,
    .program-card,
    .feature-card,
    .gallery-item {
        will-change: transform;
    }
}

/* Mobile menu overlay */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    .nav-menu.active::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Input autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 215, 0, 0.1) inset;
    -webkit-text-fill-color: #FFFFFF;
    transition: background-color 5000s ease-in-out 0s;
}

/* Placeholder color */
::placeholder {
    color: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Select arrow fix */
select::-ms-expand {
    display: none;
}

/* Number input spinner hide */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Date input fix */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

/* Link hover fix */
a {
    -webkit-tap-highlight-color: transparent;
}

/* Button active state */
.btn:active {
    transform: scale(0.98);
}

/* Card hover fix */
@media (hover: hover) {
    .program-card:hover,
    .feature-card:hover,
    .gallery-item:hover {
        transform: translateY(-10px);
    }
}

@media (hover: none) {
    .program-card:active,
    .feature-card:active,
    .gallery-item:active {
        transform: translateY(-5px);
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS fixed positioning fix */
    .navbar {
        position: -webkit-sticky;
        position: sticky;
    }

    /* iOS input zoom prevent */
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    /* Firefox scrollbar */
    * {
        scrollbar-width: thin;
        scrollbar-color: #FFD700 #0A0A0A;
    }
}

/* Safari specific fixes */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .hero-title,
        .section-title {
            background-attachment: fixed;
        }
    }
}

/* Edge specific fixes */
@supports (-ms-ime-align:auto) {
    .registration-form,
    .contact-form {
        border: 2px solid rgba(255, 215, 0, 0.3);
    }
}

/* Print specific overrides */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
    }

    .navbar,
    .footer,
    .hero,
    .back-to-top,
    .hamburger,
    .scroll-indicator {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

@media (max-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .d-sm-none {
        display: none !important;
    }

    .d-sm-block {
        display: block !important;
    }
}

/* Margin utilities */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.pt-1 { padding-top: 0.5rem !important; }
.pt-2 { padding-top: 1rem !important; }
.pt-3 { padding-top: 1.5rem !important; }
.pb-1 { padding-bottom: 0.5rem !important; }
.pb-2 { padding-bottom: 1rem !important; }
.pb-3 { padding-bottom: 1.5rem !important; }

/* Width utilities */
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

/* Height utilities */
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* Visibility */
.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

.opacity-0 {
    opacity: 0 !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

/* Position utilities */
.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.position-fixed {
    position: fixed !important;
}

.position-sticky {
    position: sticky !important;
}