:root {
    --color-black: #000000;
    --color-red: #ff4d4d;
    --color-white: #ffffff;
    --color-dark-grey: #1a1a1a;
    --color-grey: #333333;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Effects */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 77, 77, 0.3);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
    z-index: 1000;
    pointer-events: none;
    animation: scan 4s linear infinite;
    opacity: 0.5;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

@keyframes scan {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

/* Header */
.header {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid var(--color-dark-grey);
    backdrop-filter: blur(5px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--color-red);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-link {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-link:hover {
    color: var(--color-red);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-black);
    padding: 20px;
    border-top: 1px solid var(--color-dark-grey);
    flex-direction: column;
    gap: 15px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-dark-grey);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.rec-indicator {
    position: absolute;
    top: -50px;
    left: 20px;
    color: var(--color-red);
    font-weight: 700;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 8px;
}

.img {
    background-position: center;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: var(--color-red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-red);
    color: var(--color-white);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.4);
}

.btn-primary:hover {
    background-color: #e60000;
    box-shadow: 0 0 25px rgba(255, 77, 77, 0.6);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    margin-left: 20px;
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 77, 77, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Services */
.services {
    padding: 100px 0;
    background-color: var(--color-dark-grey);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center !important;
    width: 100%;
    display: block;
    position: relative;
    left: 0;
    transform: none;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-red);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--color-black);
    padding: 30px;
    border: 1px solid var(--color-grey);
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-red);
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.1);
}

.service-icon {
    font-size: 40px;
    color: var(--color-red);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Calculator */
.calculator {
    padding: 100px 0;
}

#calculator h2 {
    text-align: center;
}

.calc-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ccc;
}

input,
select {
    width: 100%;
    padding: 12px;
    background-color: var(--color-black);
    border: 1px solid var(--color-grey);
    color: var(--color-white);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 16px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-red);
}

/* Footer */
.footer {
    padding: 50px 0 20px;
    background-color: #0d0d0d;
    border-top: 1px solid var(--color-dark-grey);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.social-links {
    margin-top: 15px;
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #ccc;
    font-size: 24px;
}

.social-links a:hover {
    color: var(--color-red);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background-color: var(--color-dark-grey);
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    position: relative;
    border: 1px solid var(--color-red);
    transform: scale(0.7);
    transition: var(--transition);
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 30px;
    cursor: pointer;
}

.modal-window h3 {
    text-align: center;
    margin-bottom: 25px;
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.btn-block {
    width: 100%;
}

/* Portfolio */
.portfolio {
    padding: 100px 0;
    position: relative;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background-color: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.portfolio-card:hover {
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.portfolio-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%);
    transition: transform 0.5s ease, filter 0.3s ease;
}

.portfolio-card:hover .portfolio-img img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Camera Focus Effect (Corners) */
.portfolio-img::before,
.portfolio-img::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--color-red);
    border-style: solid;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.portfolio-img::before {
    top: 10px;
    left: 10px;
    border-width: 2px 0 0 2px;
    /* Top-Left */
}

.portfolio-img::after {
    bottom: 10px;
    right: 10px;
    border-width: 0 2px 2px 0;
    /* Bottom-Right */
}

.portfolio-card:hover .portfolio-img::before,
.portfolio-card:hover .portfolio-img::after {
    opacity: 1;
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 77, 77, 0.85);
    color: var(--color-white);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.portfolio-content {
    padding: 25px;
}

.portfolio-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-white);
}

.portfolio-content p {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.5;
}

/* Media Queries */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .nav,
    .header-right {
        display: none;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
        /* Ensure above mobile menu */
    }

    .header-right .hamburger {
        display: flex;
        /* Force display inside container if structure differs */
    }

    /* Fix header layout for mobile */
    .header-container {
        position: relative;
    }

    .header-container>.header-right {
        display: block;
        /* Show container for hamburger */
    }

    .header-container>.header-right>.phone-link {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .rec-indicator {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero {
        padding-top: 120px;
        height: auto;
        min-height: 100vh;
        padding-bottom: 50px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}