/* ============================================ */
/* DESIGN TOKENS (CSS Custom Properties)        */
/* ============================================ */

:root {
    /* --- Container --- */
    --container-max: 1280px;
    --container-px: clamp(1rem, 4vw, 2.5rem);
    --content-max:  56rem;           /* 896px — consistent with max-w-4xl */

    /* --- Fluid Typography Scale --- */
    --font-hero: clamp(1.875rem, 3vw + 1rem, 4.5rem);          /* 30 → 72px */
    --font-h2:   clamp(1.5rem,   2vw + 1rem, 2.75rem);          /* 24 → 44px */
    --font-h3:   clamp(1.0625rem, 0.5vw + 0.75rem, 1.375rem);  /* 17 → 22px */
    --font-lead: clamp(1rem, 0.75vw + 0.75rem, 1.25rem);        /* 16 → 20px */
    --font-body: 1rem;                                           /* 16px fixed */

    /* --- Line Heights --- */
    --lh-display: 1.1;
    --lh-heading: 1.15;
    --lh-lead:    1.55;
    --lh-body:    1.75;

    /* --- Section Vertical Spacing --- */
    --space-section: clamp(3.5rem, 7vw, 6rem);  /* 56 → 96px */
}

/* ============================================ */
/* LAYOUT UTILITIES                             */
/* ============================================ */

/* Unified container — replaces all "container mx-auto px-4/px-6 max-w-7xl" variants */
.c-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-px);
}

/* Inner content column — replaces max-w-4xl mx-auto */
.c-content {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
}

/* Fluid section padding */
.section-py {
    padding-block: var(--space-section);
}

/* ============================================ */
/* TYPOGRAPHY UTILITIES                         */
/* ============================================ */

.t-hero {
    font-size: var(--font-hero);
    line-height: var(--lh-display);
}

.t-h2 {
    font-size: var(--font-h2);
    line-height: var(--lh-heading);
}

.t-h3 {
    font-size: var(--font-h3);
    line-height: var(--lh-heading);
}

.t-lead {
    font-size: var(--font-lead);
    line-height: var(--lh-lead);
}

/* --- Prose width constraints (WCAG readability) --- */

/* Body paragraphs: max 65 chars/line */
.prose-body {
    max-width: 65ch;
}

/* Centred lead / subtitle text: max 55 chars/line */
.prose-lead {
    max-width: 55ch;
    margin-inline: auto;
}

/* ============================================ */
/* GLOBAL STYLES */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Offset for fixed header when navigating to anchors */
section[id],
div[id] {
    scroll-margin-top: 0px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ============================================ */
/* ANIMATIONS */
/* ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Animations */
@keyframes heroTitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroSubtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroButtonsFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: heroTitleFadeIn 1.2s ease-out forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: heroSubtitleFadeIn 1.4s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-buttons {
    animation: heroButtonsFadeIn 1.4s ease-out 0.6s forwards;
    opacity: 0;
}

/* ============================================ */
/* CUSTOM UTILITIES */
/* ============================================ */

.container {
    max-width: var(--container-max);  /* 1280px — aligned with c-container */
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

/* Custom scrollbar (disabled to match default scrollbars on all pages) */

/* ============================================ */
/* FIXED HEADER TRANSITION */
/* ============================================ */

header {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

/* Header semi-transparent state (at page top) */
.header-top {
    background-color: rgba(255, 255, 255, 0.30);
    -webkit-backdrop-filter: blur(4px);
}

/* Header large state (at page top) — logo, text, padding bigger */
.header-large .header-logo {
    height: 4rem !important;  /* h-16 */
}

.header-large .header-inner {
    padding-top: 1rem !important;    /* py-4 */
    padding-bottom: 1rem !important;
}

.header-large .nav-link {
    font-size: 1.125rem !important;  /* text-lg */
}

/* Header compact state (scrolled) */
.header-compact .header-logo {
    height: 3rem !important;  /* h-12 */
}

.header-compact .header-inner {
    padding-top: 0.5rem !important;  /* py-2 */
    padding-bottom: 0.5rem !important;
}

.header-compact .nav-link {
    font-size: 1rem !important;  /* text-base */
}

/* Fixed-width nav link boxes to prevent layout shift */
header .nav-link {
    display: inline-block;
    min-width: 8.5rem;  /* 136px — fits "Hizmetlerimiz" at text-lg comfortably */
    text-align: left;
    transition: font-size 0.5s ease, color 0.3s ease;
}

/* ============================================ */
/* FOOTER — DEEP DARK NAVY                     */
/* ============================================ */

footer {
    background: #0b1420;
    position: relative;
    overflow: hidden;
}

/* Subtle dot-pattern overlay */
footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://upload.wikimedia.org/wikipedia/commons/3/3d/Simple_world_map.svg')
                no-repeat right center / 55% auto;
    opacity: 0.04;
    pointer-events: none;
}

/* Very faint right-side glow */
footer::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(46, 139, 192, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

footer > * {
    position: relative;
    z-index: 1;
}

/* Border color update for dark footer */
footer .border-marine-light {
    border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================ */
/* BACK TO TOP BUTTON */
/* ============================================ */

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ============================================ */
/* FORM STYLES */
/* ============================================ */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2E8BC0;
    box-shadow: 0 0 0 3px rgba(46, 139, 192, 0.1);
}

/* ============================================ */
/* RESPONSIVE ADJUSTMENTS */
/* ============================================ */

/* Font-size overrides removed — fluid clamp() handles all breakpoints via .t-hero / .t-h2 / .t-h3 / .t-lead */

/* ============================================ */
/* LOADING ANIMATION FOR IMAGES */
/* ============================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================ */
/* HERO SECTION OVERLAY */
/* ============================================ */

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 35, 66, 0.8) 0%, rgba(30, 73, 118, 0.6) 100%);
}

/* ============================================ */
/* ABOUT SECTION — DARK BLUE BACKGROUND        */
/* ============================================ */

.about-section-bg {
    background: linear-gradient(135deg, #08315f 0%, #0A2342 50%, #0b346d 100%);
    position: relative;
    overflow: hidden;
}

/* Dotted world map overlay */
.about-section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://upload.wikimedia.org/wikipedia/commons/3/3d/Simple_world_map.svg')
                no-repeat left center / 60% auto;
    opacity: 0.07;
    pointer-events: none;
}

/* Ensure content sits above pseudo-element overlays */
.about-section-bg > .c-container {
    position: relative;
    z-index: 1;
}

/* Cyan radial glow (left-center, like the reference image) */
.about-section-bg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(46, 139, 192, 0.28) 0%, transparent 68%);
    pointer-events: none;
}

/* ============================================ */
/* HORIZONTAL SERVICE CARDS                     */
/* ============================================ */

/* Card wrapper — fixed height so all cards match */
.service-card-h {
    height: 160px;
}

/* Image pane with diagonal right-edge clip */
.service-card-img {
    width: 42%;
    height: 100%;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================ */
/* SERVICE CARDS HOVER EFFECT */
/* ============================================ */

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

/* ============================================ */
/* COUNTER ANIMATION */
/* ============================================ */

.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================ */
/* WORDPRESS COMPATIBILITY */
/* ============================================ */

/* WordPress admin bar spacing */
.admin-bar #header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #header {
        top: 46px;
    }
}

/* WordPress blocks compatibility */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Contact Form 7 styling */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
}

.wpcf7 input[type="submit"] {
    background-color: #2E8BC0;
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.wpcf7 input[type="submit"]:hover {
    background-color: #D4AF37;
}

/* WordPress gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* ============================================ */
/* PRINT STYLES */
/* ============================================ */

@media print {
    header,
    footer,
    #back-to-top,
    .no-print {
        display: none !important;
    }
}