@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;700;800&display=swap');

:root {
    --primary: #00609C;
    --primary-dark: #004570;
    --secondary: #E30613;
    --text-main: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f4f7f9;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
}

/* --- PRELOADER --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
.loader {
    width: 48px; height: 48px;
    border: 5px solid var(--primary);
    border-bottom-color: var(--secondary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
body.loaded #preloader { opacity: 0; visibility: hidden; }

/* --- ADMIN TOOLBAR --- */
body.admin-mode { margin-top: 60px; }
#admin-toolbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: #111; color: white; z-index: 10000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
[contenteditable="true"]:hover {
    outline: 2px dashed var(--secondary);
    background: rgba(255,255,255,0.8);
    cursor: text; padding: 2px; border-radius: 4px;
}
.editable-img-wrapper { position: relative; display: block; }
.editable-img-btn {
    position: absolute; top: 10px; right: 10px;
    background: var(--secondary); color: white;
    padding: 6px 12px; border-radius: 4px; font-size: 12px;
    cursor: pointer; opacity: 0; z-index: 100; transition: 0.2s;
    font-weight: 600; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.editable-img-wrapper:hover .editable-img-btn { opacity: 1; }

/* --- NAVIGATION (Glassmorphism) --- */
.navbar {
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
}
.navbar-brand img { height: 50px; width: auto; transition: transform 0.3s; }
.navbar-brand:hover img { transform: scale(1.05); }
.nav-link { font-weight: 700; color: var(--primary-dark) !important; font-size: 0.95rem; margin-left: 15px; position: relative; }
.nav-link::after {
    content: ''; position: absolute; bottom: 5px; left: 0; width: 0%; height: 2px;
    background: var(--secondary); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }
.btn-cta {
    background: linear-gradient(135deg, var(--secondary) 0%, #b0000a 100%);
    color: white; padding: 12px 30px; border-radius: 50px;
    font-weight: 700; border: none; box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
    transition: 0.3s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(227, 6, 19, 0.4); color: white; }

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    height: 90vh; min-height: 650px;
    display: flex; align-items: center;
    color: white;
    background-size: cover; background-position: center; background-attachment: fixed;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0, 20, 40, 0.9) 0%, rgba(0, 20, 40, 0.4) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-title {
    font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- STATS BAR --- */
.stats-bar {
    margin-top: -60px; position: relative; z-index: 10;
    background: white; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    padding: 30px; display: flex; justify-content: space-around; flex-wrap: wrap;
}
.stat-item { text-align: center; padding: 15px; min-width: 200px; }
.stat-item h3 { font-size: 3rem; color: var(--secondary); margin: 0; font-weight: 800; }
.stat-item p { font-size: 0.9rem; text-transform: uppercase; font-weight: 700; color: #999; letter-spacing: 1px; margin: 0; }

/* --- SERVICES --- */
.service-card {
    background: white; padding: 40px 30px;
    border-radius: 12px; border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%; position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: var(--primary); transform: scaleX(0); transition: 0.4s; transform-origin: left;
}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { font-size: 3rem; color: var(--primary); margin-bottom: 25px; display: block; transition: 0.4s; }
.service-card:hover .service-icon { color: var(--secondary); transform: scale(1.1); }

/* --- GALLERY --- */
.img-hover-zoom { overflow: hidden; border-radius: 12px; height: 100%; }
.img-hover-zoom img { transition: transform 0.6s ease; width: 100%; height: 100%; object-fit: cover; }
.img-hover-zoom:hover img { transform: scale(1.08); }

/* --- CONTACT SECTION (Map + Glass Form) --- */
.contact-section { position: relative; min-height: 750px; display: flex; align-items: center; }
.map-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.map-background iframe { width: 100%; height: 100%; border: 0; filter: contrast(1.1); }
.contact-container { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.contact-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 50px; border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    pointer-events: auto; max-width: 500px; margin-left: auto;
    border: 1px solid rgba(255,255,255,0.5);
}

/* --- FORMS --- */
.form-control, .form-select {
    background: rgba(255,255,255,0.8);
    border: 1px solid #ddd; border-radius: 8px;
    padding: 14px; font-size: 0.95rem; transition: 0.3s;
}
.form-control:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(0, 96, 156, 0.1); }
.btn-primary {
    background: var(--primary); border: none; padding: 14px;
    font-weight: 700; width: 100%; border-radius: 8px; letter-spacing: 0.5px;
    transition: 0.3s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* --- FOOTER --- */
footer { background: #0b0d10; color: #aaa; }
footer h5 { color: white; margin-bottom: 20px; }
footer a { transition: 0.2s; }
footer a:hover { color: var(--secondary) !important; padding-left: 5px; }

/* Responsive Fixes */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-section { min-height: 500px; height: auto; padding: 100px 0; }
    .contact-box { margin: 0 auto; width: 95%; padding: 30px; }
    .stats-bar { flex-direction: column; gap: 20px; margin-top: 20px; }
}