:root {
    --primary-color: #0a192f;
    --secondary-color: #00bcd4;
    /* Electric Blue */
    --text-color: #333;
    --page-light-bg: #f4f6f8;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --modal-bg: rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--page-light-bg);
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Header */
#main-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    /* Adjust based on header height */
    width: auto;
}

/* Optional: Shrink on scroll if needed, but for now stick to large */

#main-nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

#main-nav a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

#main-nav a:hover,
#main-nav a.active {
    color: var(--secondary-color);
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--primary-color) !important;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 700 !important;
}

.btn-cta:hover {
    background-color: #008ba3;
    /* Darker cyan */
    color: var(--white) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    text-align: left;
    color: var(--white);
    margin-top: -70px;
    padding-top: 70px;
    overflow: hidden;
    background-color: transparent;
}

.hero-bg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: 0;
    /* Base layer */
    pointer-events: none;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    /* Dark fallback */
    background-color: #0a192f;
    /* Local Image */
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    transform-origin: center center;
    will-change: transform;
    /* Automatic Cinematic Animation */
    animation: hero-move 12s ease-in-out infinite alternate;
    animation-delay: -3s;
}

@keyframes hero-move {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.15) translate(-2%, -1%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-img {
        animation: none;
    }
}

/* Dark gradient overlay for hero */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Enhanced dark blue overlay for better text readability */
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.85) 0%, rgba(10, 25, 47, 0.7) 50%, rgba(10, 25, 47, 0.95) 100%);
    z-index: 1;
    /* Above bg */
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Highest */
    max-width: 900px;
    /* Increased slightly for longer text */
    text-align: left;
}

#hero h1 {
    font-size: 5rem;
    /* Increased size */
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 2px 5px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    font-weight: 400;
    max-width: 700px;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #008ba3;
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 30px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    border-top: 3px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    outline: none;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1), 0 0 15px rgba(0, 188, 212, 0.15);
}

.service-card:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.icon-badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 188, 212, 0.05);
    border: 1px solid rgba(0, 188, 212, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.icon-badge img {
    max-width: 70%;
    height: auto;
    object-fit: contain;
}

.service-card h3 {
    margin-bottom: 0;
    font-size: 1.3rem;
    line-height: 1.2;
}

.service-list {
    margin-bottom: 20px;
    flex-grow: 1;
    list-style: none;
    padding: 0;
}

.service-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.service-list li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
    top: -2px;
}

.card-footer {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trust-hint {
    font-size: 0.8rem;
    color: #999;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    align-self: flex-start;
}

.btn-link .arrow {
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.service-card:hover .btn-link .arrow,
.btn-link:hover .arrow {
    transform: translateX(4px);
}

.btn-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.service-card:hover .btn-link::after,
.btn-link:hover::after {
    width: 100%;
}

/* Technologies / Premium Glass Layout */
.tech-layout {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.tech-text {
    flex: 0 0 60%;
}

.tech-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.tech-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Glassmorphism utility */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 200, 255, 0.3);
}

.pillar-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.pillar-card p {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Blueprint Card */
.tech-visual {
    flex: 1;
}

.blueprint-card {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blueprint-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 200, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
}

.blueprint-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.blueprint-label {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(0, 200, 255, 0.6);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* Smart Home Ecosystem SVG Diagram */
.diagram-wrapper {
    width: 100%;
    height: 100%;
    padding: 20px;
}

.ecosystem-svg {
    width: 100%;
    height: 100%;
    max-width: 350px;
    max-height: 350px;
    overflow: visible;
}

.diagram-circle {
    fill: rgba(10, 25, 47, 0.4);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
    transition: var(--transition);
}

.center-circle {
    fill: rgba(0, 200, 255, 0.05);
    stroke: rgba(0, 200, 255, 0.3);
    stroke-width: 2;
}

.diagram-icon {
    fill: none;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--transition);
}

.icon-glow {
    stroke: rgba(0, 200, 255, 0.9);
    filter: url(#svg-glow);
}

.diagram-lines line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
}

.sub-lines line {
    stroke-dasharray: 4 4;
    stroke: rgba(255, 255, 255, 0.08);
}

/* Hover effects for diagram */
.ecosystem-svg g:hover .diagram-circle {
    stroke: rgba(0, 200, 255, 0.5);
    fill: rgba(0, 200, 255, 0.1);
}

.ecosystem-svg g:hover .diagram-icon {
    stroke: rgba(255, 255, 255, 1);
}


/* Logo Wall */
.tech-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vendor-logo {
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
    /*filter: brightness(0) invert(1) opacity(0.5);
    transition: filter 0.3s ease;*/
}

.vendor-logo:hover {
    filter: brightness(0) invert(1) opacity(0.9);
}

/* Why Us / Proof Grid */
.why-section {
    position: relative;
    padding-top: 60px;
    padding-bottom: 80px;
}

.why-section .section-title {
    margin-bottom: 35px;
}

.why-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.why-grid-container {
    flex: 0 0 58%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.proof-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.proof-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 188, 212, 0.12);
    border-color: rgba(0, 188, 212, 0.2);
}

.proof-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.proof-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 188, 212, 0.05);
    color: var(--secondary-color);
    border-radius: 50%;
    border: 1px solid rgba(0, 188, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.proof-icon svg {
    width: 22px;
    height: 22px;
}

.proof-card h4 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0;
    line-height: 1.2;
}

.proof-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Right Column Trust Card */
.trust-container {
    flex: 1;
    display: flex;
}

.trust-card {
    width: 100%;
    background: rgba(10, 25, 47, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(10, 25, 47, 0.1);
}

.trust-card h3 {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.trust-card p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.trust-list {
    list-style: none;
    padding: 0;
}

.trust-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.trust-list li:last-child {
    margin-bottom: 0;
}

.trust-list .check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(0, 188, 212, 0.15);
    color: var(--secondary-color);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

/* Process and Parallax */
.bg-dark {
    background-color: var(--primary-color);
    color: var(--white);
}

.text-white {
    color: var(--white) !important;
}

/* Window Parallax Backgrounds */
.window-bg {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.window-bg-img {
    position: absolute;
    inset: -10%;
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

.window-overlay {
    position: absolute;
    inset: 0;
    /* Darker overlay than hero for contrast */
    background: linear-gradient(to bottom, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.85) 50%, rgba(10, 25, 47, 0.95) 100%);
    z-index: 1;
}

.window-content {
    position: relative;
    z-index: 2;
}

/* Process Timeline Section */
.process-section {
    padding-top: 100px;
    padding-bottom: 120px;
}

.process-header {
    text-align: center;
    margin-bottom: 60px;
}

.process-header .section-title {
    margin-bottom: 15px;
}

.process-header .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.timeline-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 188, 212, 0.05) 0%, rgba(0, 188, 212, 0.25) 50%, rgba(0, 188, 212, 0.05) 100%);
    z-index: 1;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 2;
}

.timeline-step {
    padding: 35px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    /* Increased opacity for readability */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Slightly stronger border */
    backdrop-filter: blur(12px);
    /* Slightly stronger blur */
    box-shadow: 0 8px 32px 0 rgba(10, 25, 47, 0.4);
    /* Stronger shadow to separate from background */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-step:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 188, 212, 0.4);
    box-shadow: 0 15px 32px 0 rgba(0, 188, 212, 0.2);
}

.timeline-step:hover .step-badge {
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.4);
}

.step-badge {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-family: 'Rajdhani', sans-serif;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.2);
    position: relative;
    z-index: 3;
}

.timeline-step h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.timeline-step p {
    color: rgba(255, 255, 255, 0.9);
    /* Brighter paragraph text */
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* References */
.refs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ref-item {
    height: 250px;
    background-color: #ddd;
    /* Placeholder for image */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: var(--white);
    transition: var(--transition);
}

.ref-item:hover {
    transform: scale(1.02);
}

.ref-content h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Contact Section */
.contact-card {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-info {
    flex: 1;
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 45px;
}

.contact-info h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 15px;
}

.company-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 50px;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 1.05rem;
    color: var(--white);
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-details a {
    color: var(--white);
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary-color);
}

.company-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.contact-form-wrapper {
    flex: 1.3;
    padding: 50px 45px;
    background: var(--white);
}

.contact-form-wrapper h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.b2b-form .form-row {
    display: flex;
    gap: 20px;
}

.b2b-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.b2b-form .half {
    flex: 1;
}

.b2b-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.b2b-form input,
.b2b-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.b2b-form input:focus,
.b2b-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.form-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-contact {
    font-size: 0.95rem;
    color: #666;
}

.quick-contact a {
    color: var(--primary-color);
    font-weight: 600;
}

.quick-contact a:hover {
    color: var(--secondary-color);
}

.trust-note {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
}

.trust-note span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-note svg {
    width: 16px;
    height: 16px;
    color: #aaa;
}

/* Footer */
footer {
    background-color: #050d18;
    color: #8892b0;
    text-align: center;
    padding: 20px 0;
}

/* MODAL Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: var(--white);
    padding: 40px;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active,
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal.active {
    transform: translate(-50%, -50%) scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

.modal h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.modal-body ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.modal-body li {
    margin-bottom: 10px;
}

/* Responsive */

html,
body {
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 980px) {

    .why-layout,
    .tech-layout {
        flex-direction: column;
    }

    .trust-container {
        width: 100%;
    }

    .why-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 48px 0;
    }

    .process-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo img {
        height: 40px;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    #main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px 0;
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #main-nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    #main-nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
        align-items: center;
    }

    #main-nav a {
        display: block;
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }

    .btn-cta {
        display: inline-block;
        width: 100%;
        max-width: 250px;
        margin-top: 10px;
    }

    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    #hero p {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .contact-card {
        flex-direction: column;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 40px 30px;
    }

    .b2b-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .why-grid-container {
        grid-template-columns: 1fr;
    }

    .tech-text {
        flex: 1 1 auto;
    }

    .blueprint-card {
        height: 250px;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .timeline-line {
        display: none;
    }

    .window-overlay {
        background: linear-gradient(to bottom, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.95) 100%);
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.2rem;
    }

    #hero p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 30px 20px;
    }

    .timeline-step {
        padding: 25px 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .tech-pillars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {

    /* 1) Force single-column layout for 'Proč si vybrat DAGOTEC?' */
    .why-layout,
    .why-grid-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .why-grid-container {
        gap: 20px !important;
    }

    .trust-container {
        display: block !important;
        width: 100% !important;
    }

    .proof-card,
    .trust-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2) Global guard against horizontal scroll */
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-wrap: break-word !important;
    }

    .container,
    .section {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Form Message */
.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
}
.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}