/* ==============================
   KPS BUILDERS CUSTOM STYLES
   ============================== */

:root {
    --brand: #EA211E;
    --brand-hover: #b51512;
    --dark: #0f172a;
    --darker: #020617;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --font-main: 'Outfit', sans-serif;
    --font-alt: 'Playfair Display', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

.text-center { text-align: center; }
.bg-light { background-color: var(--light); }
.bg-dark { background-color: var(--dark); }
.text-white { color: var(--white) !important; }

/* Buttons */
.btn-main, .btn-primary {
    display: inline-block;
    background: var(--brand);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--brand);
    cursor: pointer;
}

.btn-main:hover, .btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(234, 33, 30, 0.2);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease;
}

#preloader img {
    height: 120px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Header & Nav */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 5%;
    transition: var(--transition);
    background: var(--white);
}

header.scrolled {
    background: var(--white);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 12px 5%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 80px;
    background: transparent;
}

#nav-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

#nav-menu ul li a {
    font-weight: 500;
    color: var(--white);
    transition: var(--transition);
    font-size: 1rem;
}

header.scrolled #nav-menu ul li a {
    color: var(--dark);
}

#nav-menu ul li a:hover, #nav-menu ul li a.active {
    color: var(--brand);
}

header.scrolled #nav-menu ul li a.btn-primary {
    color: var(--white);
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--white);
    cursor: pointer;
}

header.scrolled .mobile-toggle {
    color: var(--dark);
}

/* Sections Global */
.section {
    padding: 100px 5%;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

.section-subtitle {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-subtitle.text-inverse {
    color: #ffb4b3;
}

.section-title {
    font-size: 3rem;
    font-family: var(--font-alt);
    margin-bottom: 50px;
}

/* Hero Section */
#hero {
    height: 100vh;
    min-height: 700px;
    background: url('https://images.unsplash.com/photo-1541888086425-d81bb19240f5?q=80&w=1920') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: var(--white);
}

.hero-content .badge {
    background: rgba(234, 33, 30, 0.2);
    border: 1px solid var(--brand);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-family: var(--font-alt);
    margin-bottom: 25px;
    color: var(--white);
}

.hero-content h1 span {
    color: var(--brand);
    font-style: italic;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

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

.img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.img-wrapper img {
    border-radius: 20px;
    transform: scale(1.05);
    transition: var(--transition);
}

.img-wrapper:hover img {
    transform: scale(1);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--brand);
    color: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(234, 33, 30, 0.3);
}

.experience-badge h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 0;
}

.features-list {
    list-style: none;
    margin-top: 30px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--gray);
}

.features-list i {
    color: var(--brand);
    font-size: 1.5rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: left;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--brand);
}

.service-card .icon-box {
    height: 70px;
    width: 70px;
    background: rgba(234, 33, 30, 0.1);
    color: var(--brand);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    font-size: 2rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .icon-box {
    background: var(--brand);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--gray);
}

/* Portfolio Instant Load CSS Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
}

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

.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition);
}

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

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item h3 {
    color: var(--white);
    transform: translateY(20px);
    transition: var(--transition);
}

.portfolio-item:hover h3 {
    transform: translateY(0);
}

/* Testimonials */
.testimonials-scroller {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: var(--white);
    text-align: left;
}

.testimonial-card .stars {
    color: #fbbf24;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 25px;
}

.testimonial-card h4 {
    color: var(--white);
    margin-bottom: 5px;
}

.testimonial-card span {
    color: var(--brand);
    font-size: 0.9rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info .info-block {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.info-icon {
    height: 60px;
    width: 60px;
    background: rgba(234, 33, 30, 0.1);
    color: var(--brand);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

.contact-info p {
    color: var(--gray);
}

.contact-form-container {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group.full-width {
    width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    background: #f8fafc;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(234, 33, 30, 0.1);
}

.captcha-row {
    background: var(--light);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    padding: 16px;
}

.form-messages {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: none;
    text-align: center;
    font-weight: 600;
}

.form-messages.success {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.form-messages.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* Footer */
#footer {
    background-color: var(--white);
    color: var(--text-color);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

#footer p {
    max-width: 500px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.footer-logo {
    height: 100px;
    margin: 0 auto 20px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.socials a {
    height: 45px;
    width: 45px;
    background: rgba(0,0,0,0.05);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--darker);
    font-size: 1.2rem;
    margin: 0 10px;
    transition: var(--transition);
}

#nav-menu ul li a {
    color: var(--darker);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 15px;
    transition: var(--transition);
}

.socials a:hover {
    color: var(--white);
    background: var(--brand);
    transform: translateY(-5px);
}

.footer-divider {
    border-color: rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 991px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 3.5rem; }
    .mobile-toggle { display: block; }
    #nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        padding: 100px 40px;
        transition: var(--transition);
    }
    #nav-menu.active { right: 0; }
    #nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
    }
    #nav-menu ul li a { color: var(--dark); font-size: 1.2rem; }
    .form-row { flex-direction: column; gap: 0; }
}

/* Floating Actions */
.floating-btn {
    position: fixed;
    right: 30px;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}
.whatsapp-btn {
    bottom: 90px;
    background-color: #25D366;
}
.whatsapp-btn:hover { background-color: #1ebe5d; transform: scale(1.1); }

.scroll-top-btn {
    bottom: 30px;
    background-color: var(--brand);
    opacity: 0;
    visibility: hidden;
}
.scroll-top-btn.active {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover { background-color: var(--brand-hover); transform: scale(1.1); }
