/*
  Custom Styles for Ay Global Gümrük Müşavirliği
  ------------------------------------------------
  - Professional Color Palette
  - Modern Typography
  - Enhanced UI Elements
  - Responsive Design
*/

/* 1. Variables & Global Styles
------------------------------------------------ */
:root {
    --primary-color: #1b232e;
    --secondary-color: #8f363f;
    --accent-color: #cc4757;
    --text-color: #333;
    --text-light: #f8f9fa;
    --light-gray: #4a5664;
    --white: #ffffff;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Lato', sans-serif;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
}

.bg-light {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 12px 30px;
    font-weight: 700;
    font-family: var(--body-font);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    --bs-btn-color: #1b232e;
    --bs-btn-border-color: #1b232e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #8f363f;
    --bs-btn-hover-border-color: #8f363f;
    --bs-btn-focus-shadow-rgb: 13,110,253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #8f363f;
}

/* 2. Header & Navigation
------------------------------------------------ */
#top-bar {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.5rem 0;
    font-size: 0.75rem;
}
#top-bar a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
#top-bar a:hover {
    color: var(--accent-color);
}
.social-links-top a {
    margin-left: 1rem;
}

header.sticky-top {
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

header.sticky-top.header-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}
.header-scrolled .navbar-brand img {
    height: 50px;
}

.navbar-nav .nav-link {
    font-weight: 700;
    font-family: var(--body-font);
    color: var(--primary);
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    text-shadow: 0 0.5px 2px rgba(0,0,0,0.6);
    position: relative;
    background-color: transparent !important;
}
.header-scrolled .navbar-nav .nav-link {
    color: var(--text-color);
    text-shadow: none;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}
.header-scrolled .navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}
.header-scrolled .navbar-nav .nav-link::after {
    background-color: var(--secondary-color);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

/* 3. Hero Section & Slider
------------------------------------------------ */
.hero-section {
    min-height: 85vh;
    position: relative;
    overflow: visible;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 44, 79, 0.6);
    z-index: 1;
}
.hero-bg-video {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}
.hero-section .container {
    z-index: 2;
}

.hero-slider .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hero-slider .lead {
    max-width: 800px;
    margin: 1rem auto 2rem;
}
.swiper-pagination{
    display:none;
}
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    opacity: 1;
    transition: background-color 0.3s ease;
}
.swiper-pagination-bullet-active {
    background-color: var(--white);
}

/* 4. Sections & Cards
------------------------------------------------ */
section {
    scroll-margin-top: 80px;
}

.elevated-section {
    position: relative;
    z-index: 3;
    margin-top: -20vh;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card {
    background: #fbfbfc;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #eee;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}
.card:hover {
    transform: translateY(-40px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3) !important;
    border-color: var(--secondary-color);
}

/* 5. Service Spotlight Section */
.service-details-box {
    background-color: #e9ecef;
    border-radius: .5rem;
    padding: 1.5rem;
    text-align: left;
    border: 1px solid #dee2e6;
}
.service-details-box h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}
.service-details-box ul {
    list-style: none;
    padding-left: 0;
}
.service-details-box ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
}
.service-details-box ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 6. Our Process Section */
#surec .col-md-3 {
    position: relative;
    padding: 1rem;
}
#surec .icon-container {
    border-radius: 50%; /* Ensures the glow is circular */
}
#surec .col-md-3:not(:last-child)::after {
    content: '→';
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: absolute;
    right: -15%;
    top: 20px;
    opacity: 0.3;
    transform: scale(1);
}

@keyframes icon-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(143, 54, 63, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(143, 54, 63, 0);
    }
}

@keyframes arrow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Applying the new, slower animations */
#surec .row > div:nth-child(1) .icon-container {
    animation: icon-glow 8s infinite 0s;
}
#surec .row > div:nth-child(1):not(:last-child)::after {
    animation: arrow-pulse 8s infinite 0s;
}

#surec .row > div:nth-child(2) .icon-container {
    animation: icon-glow 8s infinite 2s;
}
#surec .row > div:nth-child(2):not(:last-child)::after {
    animation: arrow-pulse 8s infinite 2s;
}

#surec .row > div:nth-child(3) .icon-container {
    animation: icon-glow 8s infinite 4s;
}
#surec .row > div:nth-child(3):not(:last-child)::after {
    animation: arrow-pulse 8s infinite 4s;
}

#surec .row > div:nth-child(4) .icon-container {
    animation: icon-glow 8s infinite 6s;
}

/* 6.5 About Section */
#hakkimizda .lead {
    font-size: 1.1rem;
    color: var(--light-gray);
    font-weight: 400;
}
.about-slider-container {
    position: relative;
    padding: 2rem 0;
}
.about-slider {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
}
.about-slider .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 300px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
}
.about-slider .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}
.about-slider-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80%;
    height: 80%;
    background-color: var(--secondary-color);
    opacity: 0.1;
    border-radius: 1rem;
    z-index: -1;
}

/* 7. FAQ Section */
.accordion-button:not(.collapsed) {
    background-color: var(--secondary-color);
    color: var(--white);
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 7px 1px var(--secondary-color);
}

/* 8. References Slider */
.references-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.references-slider .ref-logo {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.references-slider .swiper-slide:hover .ref-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* 8. Icon Styling */
.icon-container {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.4);
}
.icon-container svg {
    width: 32px; height: 32px;
}

/* 9. Contact Section & Map */
#iletisim a {
    text-decoration: none;
    color: var(--text-color);
}
#iletisim a:hover {
    color: var(--secondary-color);
}
.map-container {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}
.map-container iframe {
    display: block;
}

/* 10. Footer
------------------------------------------------ */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 2rem;
    font-size: 0.9rem;
}
.footer-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}
.footer-about {
    color: #adb5bd;
}
.footer-heading {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}
.footer-links li, .footer-contact li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}
.footer-links a, .footer-contact a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}
.footer-links a svg {
    margin-right: 0.75rem;
    transition: transform 0.3s ease;
}
.footer-links a:hover svg {
    transform: scale(1.2);
}
.footer-links a:hover, .footer-contact a:hover {
    color: var(--white);
}
.footer-contact svg {
    margin-right: 0.5rem;
    position: relative;
    top: -1px;
    flex-shrink: 0; /* Prevents the icon from shrinking */
}
.social-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}
.social-icon:hover {
    transform: scale(1.1);
}
.social-links-footer a {
    display: inline-block;
    width: 40px; height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.social-links-footer a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}
.copyright-text {
    border-top: 1px solid var(--light-gray);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.85rem;
}

.back-to-top {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: var(--secondary-color);
    width: 40px;
    height: 40px;
    border-radius: 50px;
    transition: all 0.4s;
    color: var(--white);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 11. Responsive Design
------------------------------------------------ */
@media (max-width: 992px) {
    .navbar-nav {
        border-radius: 5px;
        padding: 1rem;
        margin-top: 1rem;
    }
    .header-scrolled .navbar-nav .nav-link,
    .navbar-nav .nav-link {
        color: var(--text-color);
        text-shadow: none;
    }
    .navbar-nav .nav-link::after {
        background-color: var(--secondary-color);
        left: 1rem; /* Align to the left */
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    #top-bar {
        display: none;
    }
    .hero-section {
        min-height: 70vh;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .elevated-section {
        margin-top: -80px;
        border-radius: 0;
        background-color: var(--white);
    }
    #surec .col-md-3:not(:last-child)::after {
        content: '↓';
        font-size: 2rem;
        right: 48.7%;
        top: auto;
        bottom: -25px; /* Adjusted position */
        transform: translateX(50%);
    }
    #surec .row > * {
        margin-bottom: 50px; /* Increased margin */
    }
    .footer-heading {
        margin-top: 2rem;
    }
}
