* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --castrol-red: #ED1C24;
    --castrol-green: #00B140;
    --dark-gray: #1a1a2e;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-red: linear-gradient(135deg, #ED1C24 0%, #c71820 100%);
    --gradient-green: linear-gradient(135deg, #00B140 0%, #007d2d 100%);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    background-attachment: fixed;
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.5s ease-out;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-green);
}

.logo-container {
    margin-bottom: 25px;
}

.logo {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(237, 28, 36, 0.2));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header h1 {
    color: var(--dark-gray);
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark-gray) 0%, #4a4a6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #5a6c7d;
    font-size: 1.15rem;
    font-weight: 500;
}

/* Controls */
.controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.7s ease-out;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 15px 24px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--castrol-red);
    background: white;
    box-shadow: 0 4px 16px rgba(237, 28, 36, 0.15);
    transform: translateY(-2px);
}

.search-box button {
    padding: 15px 35px;
    background: transparent;
    color: #00b140;
    border: 1px solid #00b140;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box button:hover {
    background: #00b140;
    color: white;
    padding: 15px 43px;
}

.search-box button:active {
    transform: translateY(0);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 28px;
    background: transparent;
    color: #1a1a2e;
    border: 1px solid #1a1a2e;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-btn:hover {
    background: #1a1a2e;
    color: white;
    padding: 14px 36px;
}

.filter-btn.active {
    background: #00b140;
    color: white;
    border-color: #00b140;
    padding: 14px 36px;
}

.filter-icon {
    font-size: 1.2rem;
}

.filter-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

/* Map Container */
.map-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

#map {
    height: 650px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.map-legend {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.legend-icon.castrol-icon {
    object-fit: contain;
    background: white;
    border: 2px solid var(--castrol-green);
    padding: 2px;
    border-radius: 50%;
}

.legend-icon.default-icon {
    background: #3388ff;
    border: 2px solid #0066cc;
}

/* Services List */
.services-list {
    background: #ffffff;
    padding: 44px;
    border-radius: 24px;
    border: 1px solid #ededed;
    box-shadow: none;
    animation: fadeInUp 0.9s ease-out;
}

.services-list h2 {
    color: #111111;
    margin-bottom: 28px;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#servicesList {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Tab Navigation */
.block-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    border-bottom: 1px solid #efefef;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.block-tabs::-webkit-scrollbar {
    height: 6px;
}

.block-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.block-tabs::-webkit-scrollbar-thumb {
    background: var(--castrol-red);
    border-radius: 3px;
}

.tab-btn {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid #e6e6e6;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: auto;
    position: relative;
}

.tab-btn::before {
    content: none;
}

.tab-btn:hover {
    border-color: #111111;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
    box-shadow: none;
    transform: none;
}

.tab-btn.active::before {
    height: 0;
}

.tab-block {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tab-count {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 500;
}

.tab-castrol {
    font-size: 0.7rem;
    background: #f6f6f6;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    color: #111111;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-castrol-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.tab-btn.active .tab-castrol {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.tab-btn:not(.active) .tab-castrol {
    background: #f6f6f6;
    color: #111111;
}

/* Tab Contents */
.tab-contents {
    position: relative;
    min-height: 300px;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

.block-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: #ffffff;
    padding: 26px;
    border-radius: 16px;
    border: 1px solid #e7e7e7;
    box-shadow: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.service-card:hover {
    border-color: #111111;
    transform: translateY(-2px);
}

.service-card.castrol {
    border-left: 3px solid #00B140;
}

.service-card.castrol:hover {
    border-left-color: #00B140;
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.service-block {
    background: #111111;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.service-card.castrol .service-block {
    background: #ED1C24;
    box-shadow: none;
}

.service-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-castrol {
    background: var(--gradient-red);
    color: white;
    box-shadow: 0 2px 8px rgba(237, 28, 36, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.service-badge-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: none;
}

.service-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 10px;
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-actions {
    display: flex;
    gap: 18px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.btn {
    flex: 0 0 auto;
    min-width: auto;
    padding: 0;
    background: transparent;
    color: #111111;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    text-align: left;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.2s ease;
}

.btn:hover::after {
    width: 100%;
}

.btn-primary {
    color: #111111;
}

.btn-primary:hover {
    color: #111111;
}

.btn-secondary {
    color: #555555;
}

.btn-secondary:hover {
    color: #111111;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--dark-gray);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .services-list h2 {
        font-size: 1.8rem;
    }

    .block-services {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
        background-attachment: fixed;
    }

    .container {
        padding: 12px;
    }

    .header {
        padding: 25px 18px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    .header h1 {
        font-size: 1.65rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .logo {
        max-width: 140px;
    }

    .controls {
        padding: 18px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    .search-box input {
        width: 100%;
        padding: 14px 18px;
        font-size: 0.95rem;
    }
    
    .search-box button {
        width: 100%;
        padding: 14px;
    }

    .block-tabs {
        gap: 6px;
        margin-bottom: 20px;
    }

    .tab-btn {
        padding: 12px 16px;
        min-width: 90px;
    }

    .tab-block {
        font-size: 1rem;
    }

    .tab-count {
        font-size: 0.8rem;
    }

    .tab-castrol {
        font-size: 0.7rem;
    }

    .block-services {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .filter-btn {
        min-width: 100%;
        padding: 13px 20px;
        font-size: 0.9rem;
    }

    .map-container {
        padding: 15px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    #map {
        height: 400px;
        border-radius: 12px;
    }

    .map-legend {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .legend-icon {
        width: 24px;
        height: 24px;
    }

    .services-list {
        padding: 20px 15px;
        border-radius: 18px;
    }

    .services-list h2 {
        font-size: 1.4rem;
        margin-bottom: 18px;
        letter-spacing: 0.1em;
    }

    #servicesList {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-card {
        padding: 20px;
    }

    .service-name {
        font-size: 1.05rem;
    }

    .service-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
        align-items: flex-start;
    }

    .btn {
        width: auto;
        padding: 0;
        font-size: 0.75rem;
        min-width: auto;
        margin-bottom: 0;
    }

    .btn:last-child {
        margin-bottom: 0;
    }

    .btn-primary:hover,
    .btn-secondary:hover {
        padding: 0;
    }

    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 25px;
        border-radius: 18px;
    }

    .service-badge-logo {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .logo {
        max-width: 120px;
    }

    .header {
        padding: 20px 15px;
    }

    .controls {
        padding: 15px;
    }

    .search-box input {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .search-box button {
        padding: 12px;
        font-size: 0.9rem;
    }

    .filter-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .filter-icon {
        font-size: 1rem;
    }

    .service-actions {
        gap: 10px;
    }

    .btn {
        padding: 0;
        font-size: 0.72rem;
        margin-bottom: 0 !important;
    }

    .btn:last-child {
        margin-bottom: 0 !important;
    }

    .map-container {
        padding: 12px;
    }

    #map {
        height: 350px;
    }

    .map-legend {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .legend-icon {
        width: 20px;
        height: 20px;
    }

    .services-list {
        padding: 18px 12px;
    }

    .services-list h2 {
        font-size: 1.15rem;
        letter-spacing: 0.1em;
    }

    .service-card {
        padding: 15px;
    }

    .service-block {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .service-name {
        font-size: 0.95rem;
    }

    .btn {
        padding: 0;
        font-size: 0.7rem;
        letter-spacing: 0.16em;
    }

    .service-badge-logo {
        width: 36px;
        height: 36px;
    }

    .modal-content {
        padding: 20px;
        margin: 20% auto;
    }

    .close {
        font-size: 24px;
        right: 15px;
        top: 15px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .logo {
        max-width: 100px;
    }

    #map {
        height: 300px;
    }

    .service-card {
        padding: 12px;
    }

    .btn {
        padding: 0;
        font-size: 0.68rem;
    }
}

/* ========================================
   LOADING OVERLAY & SPINNER
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    display: none; /* Başlangıçta gizli */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    gap: 20px;
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--castrol-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   ERROR BANNER
   ======================================== */

.error-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(255, 107, 107, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 90%;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.error-text {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.error-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS FOR LOADING/ERROR
   ======================================== */

@media (max-width: 768px) {
    .error-banner {
        top: 10px;
        padding: 12px 16px;
        max-width: 95%;
    }
    
    .error-text {
        font-size: 0.85rem;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
    
    .loading-overlay p {
        font-size: 1rem;
    }
}
