/* ========================================
   ABC Isolations - Modern CSS
   ======================================== */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #01657f;
    --secondary-color: #e75300;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--secondary-color);
    font-weight: 700;
}

/* === UTILITY CLASSES === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

/* === LANGUAGE SELECTOR === */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 50px;
    transition: var(--transition);
    color: var(--text-light);
    min-width: 45px;
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.lang-btn:hover:not(.active) {
    background: var(--bg-light);
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 9999;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo img {
    height: 60px;
    width: auto;
}

.menu-items {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu-items a {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
}

.menu-items a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-items a:hover::after,
.menu-items a.active::after {
    width: 100%;
}

.cta-btn {
    background: var(--secondary-color);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}

.cta-btn::after {
    display: none !important;
}

.cta-btn:hover {
    background: #c84600;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* === HERO CAROUSEL === */
.hero-carousel {
    position: relative;
    height: 90vh;
    margin-top: 80px;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-title {
    color: var(--white);
    text-align: center;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    padding: 2rem;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: var(--transition);
}

.carousel-control:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 2rem;
}

.carousel-control.next {
    right: 2rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active,
.indicator:hover {
    background: var(--white);
    transform: scale(1.2);
}

/* === PAGE HEADER === */
.page-hero {
    position: relative;
    height: 50vh;
    margin-top: 80px;
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(1, 101, 127, 0.7), rgba(1, 101, 127, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay h1 {
    color: var(--white);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 6rem 0 4rem;
    margin-top: 80px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* === CONTENT GRIDS === */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse > * {
    direction: ltr;
}

.content-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-text p {
    color: var(--text-light);
    font-size: 1.05rem;
}

.content-media img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === SECTION HEADERS === */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* === PROJECTS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(1, 101, 127, 0.95));
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin: 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* === BUTTONS === */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #c84600;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* === FORMS === */
.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h6 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form-header h2 {
    color: var(--primary-color);
}

.quote-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-submit {
    text-align: center;
}

/* === CONTACT === */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.contact-info h2,
.contact-info h3 {
    color: var(--primary-color);
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.info-block p {
    margin-bottom: 0.5rem;
}

.info-block a {
    color: var(--secondary-color);
}

.info-block a:hover {
    text-decoration: underline;
}

.address {
    margin-bottom: 1.5rem;
}

.address h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* === BBC SECTION === */
.bbc-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bbc-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.bbc-content {
    max-width: 900px;
    margin: 0 auto;
}

.bbc-content p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* === CTA SECTION === */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
}

.cta-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* === 404 ERROR PAGE === */
.error-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.error-content {
    text-align: center;
    max-width: 600px;
}

.error-number {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

.error-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.error-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-links a {
    color: var(--secondary-color);
}

.error-links a:hover {
    text-decoration: underline;
}

/* === FOOTER === */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col small {
    font-size: 0.85rem;
    opacity: 0.9;
    display: block;
    margin-top: 0.2rem;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .content-grid,
    .content-grid.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }

    .bbc-images {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .carousel-control {
        width: 40px;
        height: 40px;
    }

    .carousel-control.prev {
        left: 1rem;
    }

    .carousel-control.next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile menu overlay */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 80px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 80px);
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease;
        padding: 2rem;
        z-index: 9998;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-items {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .menu-items a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        width: 100%;
    }

    .cta-btn {
        display: inline-block;
        width: auto;
        margin-top: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 10001;
        position: relative;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-carousel {
        height: 60vh;
        margin-top: 80px;
    }

    .page-hero {
        height: 40vh;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .language-selector {
        top: 90px;
        right: 15px;
        padding: 0.4rem;
        gap: 0.3rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 40px;
    }

    .navbar {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .logo img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .language-selector {
        top: 85px;
        right: 10px;
        padding: 0.3rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        min-width: 35px;
    }

    .error-number {
        font-size: 5rem;
    }

    .hero-title {
        font-size: 1.5rem;
        padding: 1rem;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* === LEGAL PAGE === */
.legal-content {
    background: var(--white);
}

.legal-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.legal-section h3 {
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legal-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-section li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--secondary-color);
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-contact {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 3rem;
}

.legal-contact h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.legal-contact p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.legal-contact a {
    color: var(--secondary-color);
}

.back-link {
    margin-top: 2rem;
}

/* === PRINT === */
@media print {
    .navbar,
    .language-selector,
    .footer {
        display: none;
    }
}
