/* 
    Costas Dienstleistungen - CSS 
    Design Inspired by Handgrid Framer Template
*/

:root {
    /* Colors */
    --primary: rgb(220, 42, 28);
    /* Exact Red provided by user */
    --primary-hover: rgb(180, 30, 20);
    --secondary: #FACC15;
    /* Vibrant Yellow (Tailwind yellow-400) */
    --secondary-hover: #EAB308;
    --bg-main: #FFFFFF;
    --bg-light: #F9FAFB;
    /* Off-white for sections */
    --bg-dark: #111827;
    /* Charcoal */
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --text-light: #F3F4F6;

    /* Shapes */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-floating: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

    /* Layout */
    --container-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    font-weight: 400;
    color: var(--text-muted);
}

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

.text-primary {
    color: var(--primary);
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-main);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(234, 179, 8, 0.5);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Icon Box */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--primary);
    flex-shrink: 0;
}

.icon-box.large {
    width: 60px;
    height: 60px;
}

.icon-box.large i {
    width: 30px;
    height: 30px;
}

.icon-small {
    width: 18px;
    height: 18px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    z-index: 1000;
    color: white;
    transition: box-shadow 0.3s ease;
    /* Specific transition to avoid blur */
}

.header.scrolled {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary);
}

.logo img {
    filter: none;
    transform: translateZ(0);
    /* Force hardware context for sharpness */
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    /* Extra sharpness for some browsers */
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.nav {
    display: flex;
    gap: 2rem;
    font-weight: 600;
}

.nav a {
    color: white;
    opacity: 0.9;
}

.nav a:hover {
    opacity: 1;
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: white;
}

.contact-number a {
    color: white;
}

.contact-number a:hover {
    text-decoration: underline;
}

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

.header .btn-primary:hover {
    background-color: var(--bg-light);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.2);
}



.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    /* Visible on hero overlay */
    z-index: 1001;
    /* Above mobile menu */
    transition: color 0.3s ease;
}

/* Header state when menu is active */
body.mobile-menu-active .header {
    background: var(--primary) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

body.mobile-menu-active .menu-toggle {
    color: white;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    /* Below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: white;
    padding: 2rem;
    z-index: 1000;
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mobile-menu .nav {
    width: 100%;
    max-width: 300px;
}

.mobile-link {
    font-size: 1.25rem;
    font-weight: 600;
    /* Match desktop nav weight */
    padding: 1rem;
    color: var(--text-main) !important;
    /* Force dark color on white background */
    display: block;
    border-radius: var(--radius-md);
}

.mobile-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.flex-col {
    flex-direction: column;
    gap: 1rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-main);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.5)), url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 1;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
        /* Fix for mobile background issues */
        background-position: 20% center;
        /* Shift image left to show people */
    }
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Animations & Scroll Effects */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger reveals */
.service-card.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.service-card.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.service-card.reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.service-card.reveal:nth-child(5) {
    transition-delay: 0.4s;
}

/* Hero Card Retired - Content is now direct */
.hero-content {
    max-width: 800px;
    color: white;
}

.hero-content h1,
.hero-content p {
    color: white;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Services Bento Grid Restored */
.services-section {
    position: relative;
    z-index: 10;
    padding: 6rem 0;
    background-color: var(--bg-light);
}

/* Services Bento Grid */
.section-header {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
}

/* Ensure cards look great */
.service-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    grid-column: span 4;
    box-shadow: var(--shadow-md);
}

.service-card.main-feature {
    grid-column: span 8;
    grid-row: span 2;
}

.service-card.large-card {
    grid-column: span 8;
}

.service-card.wide-card {
    grid-column: span 12;
    background: white;
    border: 1px solid #E5E7EB;
    min-height: 250px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.service-content-floating {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: var(--shadow-floating);
    transition: transform 0.3s ease;
}

.service-card:hover .service-content-floating {
    transform: translateY(-5px);
}

.service-content-floating.compact {
    padding: 1rem;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

.service-content-floating p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-content-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem;
    height: 100%;
    gap: 2rem;
}

.service-content-inline p {
    max-width: 600px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.about-images {
    position: relative;
}

.img-wrapper.main-img {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.img-wrapper.main-img img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.img-wrapper.floating-img {
    position: absolute;
    bottom: -2rem;
    left: -2rem;
    z-index: 2;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-floating);
    text-align: center;
    min-width: 200px;
}

.stat-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.team-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid #E5E7EB;
    transition: box-shadow 0.3s ease;
}

.team-card:hover {
    box-shadow: var(--shadow-md);
}

.team-avatar {
    margin-bottom: 1.5rem;
    display: inline-block;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
}

.avatar-placeholder.bg-alt {
    background: #E0E7FF;
    color: #4F46E5;
}

.team-info .role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Footer & Contact */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 6rem 0 2rem;
}

.footer h2 {
    color: white;
}

.footer-cta {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    margin-bottom: 4rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-notice {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo .logo-text {
    color: white;
}

.brand-desc {
    margin-top: 2rem;
    opacity: 0.7;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-links i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-auto-rows: minmax(300px, auto);
        display: flex;
        flex-direction: column;
    }

    .service-card {
        min-height: 400px;
    }

    .service-content-inline {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

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

@media (max-width: 768px) {

    .desktop-nav,
    .hidden-mobile {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .hero-content {
        padding: 4rem 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

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

    .img-wrapper.floating-img {
        left: 0;
        bottom: -1rem;
    }

    .team-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}