/* Global Variables & Reset */
:root {
    --primary-color: #0d2e53;
    /* Dark Blue from Logo Text 'TEPRA' */
    --accent-color: #b71c1c;
    /* Red from Logo Text 'SERVICES' */
    --secondary-color: #3498db;
    /* Light blue from water drop */
    --light-bg: #f8f9fa;
    --dark-bg: #05162a;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    /* Modern rounded buttons */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 15px auto 0;
    border-radius: 2px;
}

.highlight {
    color: var(--accent-color);
    /* Changed to red for emphasis */
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 55px;
    /* Slightly larger */
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 30px;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-links>a:not(.btn-highlight):not(.btn-icon)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links>a:not(.btn-highlight):not(.btn-icon)::hover::after {
    width: 100%;
}

.contact-buttons-nav {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.nav-links .btn-highlight {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(183, 28, 28, 0.2);
}

.nav-links .btn-highlight:hover {
    background-color: #a01818;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(183, 28, 28, 0.3);
}

.nav-links .btn-icon {
    font-size: 1.2rem;
    margin-left: 15px;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f4f8;
    transition: var(--transition);
}

.nav-links .btn-icon:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-color: var(--primary-color);
    background-image: url('assets/hero_bg.png');
    /* New generated image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    margin-top: 0;
    /* Navbar is fixed */
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 46, 83, 0.9) 0%, rgba(13, 46, 83, 0.6) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 25px;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 300;
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
    background-color: var(--white);
    margin-top: -80px;
    /* Overlap hero */
    position: relative;
    z-index: 10;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.benefit-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(52, 152, 219, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.benefit-card:hover::before {
    transform: translateX(100%);
}

.benefit-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--accent-color);
    box-shadow: var(--shadow-hover);
}

.benefit-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    background: -webkit-linear-gradient(var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.benefit-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Services Section */
.services-section {
    padding: 120px 0 100px;
    /* More padding top because of negative margin above */
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.service-card.has-bg {
    background-size: cover;
    background-position: center;
    color: var(--white);
}

/* Overlay for bg images */
.service-card.has-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 46, 83, 0.7);
    /* Dark blue overlay */
    transition: var(--transition);
}

.service-card.has-bg:hover::after {
    background: rgba(13, 46, 83, 0.85);
}

.service-content {
    position: relative;
    z-index: 2;
    /* Above overlay */
    padding: 40px 30px;
}

/* For regular cards */
.service-card:not(.has-bg) {
    padding: 40px 30px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-card.has-bg .icon-wrapper {
    background-color: rgba(255, 255, 255, 0.15);
}

.service-card:not(.has-bg):hover .icon-wrapper {
    background-color: var(--primary-color);
}

.service-card:not(.has-bg) i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card.has-bg i {
    font-size: 2rem;
    color: var(--white);
}

.service-card:not(.has-bg):hover i {
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    transition: var(--transition);
}

.service-card.has-bg h3 {
    color: var(--white);
}

.service-card:not(.has-bg) h3 {
    color: var(--text-color);
}

/* Clickable service cards (links) */
a.service-card {
    cursor: pointer;
    display: block;
}

a.service-card.has-bg:hover::after {
    background: rgba(183, 28, 28, 0.75);
    /* Red overlay on hover for clickable cards */
}

a.service-card.has-bg:hover .icon-wrapper {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Realisations Section */
.realisations-section {
    padding: 100px 0;
    background-color: var(--white);
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.realisation-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.realisation-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.realisation-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.realisation-item:hover img {
    transform: scale(1.1);
}

.realisation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 46, 83, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.realisation-item:hover .realisation-overlay {
    opacity: 1;
}

.realisation-overlay i {
    color: var(--white);
    font-size: 2.5rem;
    transform: scale(0.5);
    transition: cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s;
}

.realisation-item:hover .realisation-overlay i {
    transform: scale(1);
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: linear-gradient(to right, #f8f9fa 70%, #fff 70%);
    /* Half layout bg */
}

.about-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.check-list li {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
}

.check-list i {
    color: var(--accent-color);
    margin-right: 25px;
    font-size: 1.4rem;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.abstract-shape {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: morph 10s ease-in-out infinite;
    box-shadow: 0 20px 50px rgba(13, 46, 83, 0.3);
    position: relative;
}

.logo-watermark {
    font-size: 10rem;
    color: rgba(255, 255, 255, 0.2);
}

@keyframes morph {
    0% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    }

    50% {
        border-radius: 40% 60% 36% 64% / 58% 34% 66% 42%;
    }

    100% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    }
}

/* New Contact Section Actions */
.contact-section {
    padding: 120px 0;
    background-color: var(--white);
    /* Light Background */
    color: var(--text-color);
    position: relative;
    text-align: center;
    overflow: hidden;
}

/* Background decoration */
.contact-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    /* Subtle blue bloom */
    pointer-events: none;
}

.contact-section .section-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-section .section-title::after {
    background: var(--accent-color);
}

.contact-section .section-subtitle {
    margin-bottom: 60px;
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-action-btn {
    background: var(--white);
    width: 280px;
    padding: 40px 20px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
}

.contact-action-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(13, 46, 83, 0.15);
    border-color: var(--secondary-color);
}

.contact-action-btn i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.email-btn i {
    color: #f39c12;
}

.phone-btn i {
    color: #2ecc71;
}

.contact-action-btn span {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-action-btn:hover span {
    color: var(--accent-color);
}

.contact-action-btn small {
    font-size: 1rem;
    opacity: 0.8;
    color: var(--text-light);
}

.contact-action-btn:hover small {
    color: var(--primary-color);
}

.contact-details-footer {
    margin-top: 60px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.contact-details-footer i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Partners Section */
.partners-section {
    padding: 80px 0;
    background-color: var(--primary-color);
    /* Dark Background */
    color: var(--white);
    position: relative;
}

.partners-section .section-title {
    color: var(--white);
    margin-bottom: 3rem;
}

.partners-section .section-title::after {
    background: linear-gradient(to right, var(--white), var(--accent-color));
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 60px;
}

.partner-logo {
    width: 160px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    filter: grayscale(100%) brightness(200%);
    /* Lighter for dark bg */
    opacity: 0.6;
}

.partner-logo:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.1);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Responsive Partners */
@media (max-width: 768px) {
    .partners-grid {
        gap: 30px;
    }

    .partner-logo {
        width: 120px;
        height: 80px;
    }
}

/* Footer */
footer {
    background-color: #030c17;
    /* Very Dark */
    color: rgba(255, 255, 255, 0.6);
    padding: 50px 0 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.footer-legal {
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.85rem;
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Refined Spacing */
.about-text p {
    margin-bottom: 40px;
    /* Increased from default */
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Mobile Optimizations */
@media (max-width: 900px) {

    /* Navbar Mobile */
    .menu-toggle {
        display: block;
        /* Show hamburger */
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        /* Hide by default */
        transition: transform 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
        /* Slide in */
    }

    .nav-links a {
        margin: 20px 0;
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    .contact-buttons-nav {
        margin-top: 30px;
        margin-left: 0;
        flex-direction: column;
        gap: 20px;
    }

    .nav-links .btn-icon {
        display: none;
        /* Hide small icons on mobile menu */
    }

    /* Hero Section Mobile */
    .hero {
        padding-top: 100px;
        text-align: center;
        background-attachment: scroll;
        /* Parallax can be jittery on mobile */
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Smaller title */
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }

    .hero-buttons .btn {
        width: 100%;
        margin-left: 0;
    }

    /* General Layout */
    .section-title {
        font-size: 2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        margin-top: 50px;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .contact-action-btn {
        width: 100%;
        max-width: 100%;
    }

    .realisations-grid {
        grid-template-columns: 1fr;
        /* Single column */
    }
}

/* Cart Styles */
.cart-link-nav {
    position: relative;
    color: #fff;
    font-size: 1.2rem;
    padding: 10px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-link-nav:hover {
    color: #00f3ff;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0b1120;
}

.cart-count.hidden {
    display: none;
}