/* =========================================
   BODY / MAIN CONTENT STYLES (JEWELRY EDITION V2)
   ========================================= */

:root {
    --black: #050505;
    --bg-dark-gray: #0a0a0a;
    /* Slightly lighter for contrast */
    --bg-deep-charcoal: #0f0f0f;
    /* Even lighter */

    --gold: linear-gradient(135deg, #F0E68C, #D4AF37);
    --silver: linear-gradient(135deg, #E0E0E0, #F5F5F5);

    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);

    --font-primary: 'Montserrat', sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: var(--black);
    color: white;
    font-family: var(--font-primary);
    line-height: 1.7;
    font-weight: 300;
    min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 200;
    letter-spacing: 0.5px;
    margin: 0;
    word-wrap: normal;
    /* Changed from break-word to prevent mid-word breaks */
    overflow-wrap: normal;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===== HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 10px;
}

.section-title {
    font-size: 3rem;
    font-weight: 100;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 1px;
}

.text-gold {
    background: var(--gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-silver {
    background: var(--silver);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== HERO SECTION (Background: Black) ===== */
.hero {
    padding-top: 180px;
    padding-bottom: 140px;
    position: relative;
    overflow: hidden;
    text-align: center;
    background-color: var(--black);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 100;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    padding: 0 10px;
}

.hero-btn {
    display: inline-block;
    padding: 1.2rem 4rem;
    font-size: 0.9rem;
    font-weight: 400;
    /* Slightly bolder for visibility */
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    text-decoration: none;

    /* Gradient Border Trick */
    border: 1px solid transparent;
    border-radius: 100px;
    background-image: linear-gradient(var(--black), var(--black)), linear-gradient(135deg, #D4AF37, #F5F5F5);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    margin: 0 auto;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    transition: all 0.3s ease;
    max-width: 100%;
}

.hero-btn:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
    /* Keep the gradient border, maybe brighten text */
    color: #D4AF37;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* ===== SERVICES (Background: Dark Gray) ===== */
.services {
    padding: 120px 0;
    background-color: var(--bg-dark-gray);
    /* Visual Distinction */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    text-align: center;
    padding: 40px 20px;
    transition: all 0.5s ease;
    border: 1px solid transparent;
    border-radius: 20px;
}

.service-card:hover {
    border-color: rgba(212, 175, 55, 0.1);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.01), transparent);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 2rem;
}

.service-icon svg {
    stroke-width: 1px;
    overflow: visible;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.1));
}

.service-title {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: white;
}

.service-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
    font-weight: 200;
}

.service-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.service-features span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #D4AF37;
    opacity: 0.7;
}

/* ===== TECH STACK (Background: Black) ===== */
.tech-stack {
    padding: 120px 0;
    background-color: var(--black);
    /* Distinct from Services */
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.tech-category-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 200;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    /* Centering */
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-icon {
    color: #D4AF37;
    font-size: 0.8rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tech-item {
    font-size: 0.85rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: all 0.3s ease;
    background: transparent;
}

.tech-item:hover {
    border-color: #D4AF37;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

/* ===== AI INTEGRATION (Redesign: Clean Techno) ===== */
.ai-integration {
    padding: 140px 0;
    /* Clean Dark Gray Background, NO Gradient */
    background-color: var(--bg-deep-charcoal);
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Subtle Grid */
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 60px 0;
}

.ai-card {
    text-align: center;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Technical Border */
    background: var(--black);
    /* Card contrast */
    border-radius: 10px;
    /* Sharper corners for techno feel */
    transition: all 0.4s ease;
}

.ai-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ai-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    /* Optional: Hexagon or Circle shape can be added via SVG in HTML, keeping CSS simple */
}

.ai-icon svg {
    stroke-width: 1px;
    filter: none;
    /* Removed gradient glow */
}

.ai-card-title {
    font-size: 1.3rem;
    font-weight: 200;
    margin-bottom: 15px;
    color: white;
}

.ai-card-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.ai-cta {
    text-align: center;
    margin-top: 60px;
}

.ai-cta-text {
    font-size: 1.2rem;
    font-weight: 200;
    margin-bottom: 40px;
}

.ai-cta-btn {
    /* Reuse Hero/Jewelry Button Style */
    display: inline-block;
    padding: 1.2rem 4rem;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    text-decoration: none;

    /* Gradient Border Trick */
    border: 1px solid transparent;
    border-radius: 100px;
    background-image: linear-gradient(var(--bg-deep-charcoal), var(--bg-deep-charcoal)), linear-gradient(135deg, #D4AF37, #F5F5F5);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    white-space: nowrap;
    transition: all 0.5s ease;
}

.ai-cta-btn:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
    color: #D4AF37;
}

/* ===== PORTFOLIO (Redesign: Project Cards with Numbers) ===== */
.portfolio {
    padding: 140px 0;
    background-color: var(--black);
    /* Distinct from AI */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 50px;
    counter-reset: portfolio-counter;
    /* Init Counter */
}

.portfolio-item {
    background: var(--bg-dark-gray);
    /* Card Background */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    counter-increment: portfolio-counter;
    /* Increment */
    min-height: 300px;
    /* Ensure height */
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    /* spacing between items if grid collapses unexpectedly */
}

/* Large Number Background */
.portfolio-item::before {
    content: "0" counter(portfolio-counter);
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    line-height: 1;
    font-family: var(--font-primary);
}

.portfolio-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-10px);
}

/* Glow effect on hover */
.portfolio-item:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05), transparent 60%);
    pointer-events: none;
}

.portfolio-item-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-item-header {
    margin-bottom: 20px;
}

.portfolio-item-title {
    font-size: 1.8rem;
    font-weight: 200;
    /* Ultra Thin */
    color: white;
    margin-bottom: 10px;
}

.portfolio-item-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #D4AF37;
    opacity: 0.8;
    border: none;
    padding: 0;
}

.portfolio-item-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-weight: 200;
    line-height: 1.6;
    flex-grow: 1;
}

.portfolio-item-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    align-self: flex-start;
    transition: all 0.3s;
}

.portfolio-item-link:hover {
    color: #D4AF37;
    border-bottom-color: #D4AF37;
}

/* ===== BLOG (Background: Dark Gray) ===== */
.blog {
    padding: 120px 0;
    background-color: var(--bg-dark-gray);
}

.blog-grid-clean {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-top: 40px;
    /* Removed top border for cleaner look */
}

.blog-item-clean {
    display: flex;
    flex-direction: column;
    padding: 25px;
    background: var(--black);
    /* Card contrast */
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.blog-item-clean:hover {
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.blog-item-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 15px;
}

.blog-item-title {
    font-size: 1.1rem;
    font-weight: 200;
    line-height: 1.4;
    margin-bottom: 15px;
    color: white;
}

.blog-item-excerpt {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 25px;
    font-weight: 200;
    flex-grow: 1;
}

/* STYLISH READ LINK (Arrow Button) */
.blog-all-link,
.blog-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    width: fit-content;
    background: transparent;
    white-space: nowrap;
}

.blog-item-meta {
    /* Hide meta for cleaner magazine look, or style minimally */
    display: none;
}

.blog-all-link:hover,
.blog-item-link:hover {
    border-color: #D4AF37;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

/* Center button for "All Articles" */
.blog-all-articles {
    text-align: center;
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

/* ===== CONTACTS (Background: Black) ===== */
.contacts {
    padding: 120px 0;
    text-align: center;
    background-color: var(--black);
}

.contact-simple {
    max-width: 600px;
    margin: 0 auto;
}

.contact-btn-simple {
    display: inline-block;
    padding: 1.2rem 4rem;
    /* Restored Padding */
    font-size: 0.9rem;
    /* Restored Size */
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    text-decoration: none;

    /* Gradient Border Trick */
    border: 1px solid transparent;
    border-radius: 100px;
    background-image: linear-gradient(var(--black), var(--black)), linear-gradient(135deg, #D4AF37, #F5F5F5);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    margin-bottom: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.contact-btn-simple:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
    color: #D4AF37;
}

.contact-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 200;
}

.location-icon {
    width: 24px;
    height: 24px;
    color: #D4AF37;
}

/* =========================================
   MOBILE ADAPTIVE (FIXED)
   ========================================= */

@media (max-width: 992px) {

    .services-grid,
    .tech-categories,
    .ai-grid,
    .blog-grid-clean,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {

    /* Global Mobile Padding */
    .hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .services,
    .tech-stack,
    .ai-integration,
    .portfolio,
    .blog,
    .contacts {
        padding: 50px 0;
    }

    /* Section Titles centering & fixing overflow-shift */
    .section-title {
        font-size: 1.4rem;
        /* Scaled down to fit long words */
        margin-bottom: 2rem;
        line-height: 1.3;
        text-align: center;
        width: 100%;
        padding: 0 10px;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
        overflow-wrap: normal;
        word-wrap: normal;
        hyphens: none;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    /* Tech Stack Fixes */
    .tech-category-title {
        flex-wrap: nowrap;
        font-size: 1rem;
        justify-content: center;
    }

    /* Grid Fixing & Width Enforcement */
    .services-grid,
    .tech-categories,
    .ai-grid,
    .portfolio-grid,
    .blog-grid-clean {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 30px;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* AI Button & Container Centering */
    .ai-cta {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Portfolio Categories Spacing */
    .portfolio-category-title {
        margin-top: 50px;
        margin-bottom: 35px;
        text-align: center;
        font-size: 1.3rem;
        width: 100%;
    }

    /* Button Consistency & Centering Fix */
    .hero-btn,
    .ai-cta-btn,
    .contact-btn-simple {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        padding: 1.1rem 2.5rem;
        width: auto;
        min-width: 180px;
        max-width: 90%;
        margin: 15px auto !important;
        line-height: 1;
        white-space: nowrap;
        /* Prevent wrap for short phrases, keep consistent with other buttons if possible */
        text-align: center;
    }

    /* Reset some specific overrides */
    .hero-btn {
        margin: 20px auto;
    }

    .contact-btn-simple {
        margin-bottom: 40px;
    }

    /* Portfolio Item Fixes */
    .portfolio-item {
        padding: 30px 20px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .portfolio-item-header {
        margin-bottom: 20px;
        text-align: left;
    }

    .portfolio-item-title {
        font-size: 1.2rem;
    }

    .portfolio-item::before {
        font-size: 4.5rem;
        top: -5px;
        right: 10px;
        opacity: 0.05;
    }

    .blog-item-clean {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }
}