/* ======================================
   ALMAZ HOME — FINAL STYLE
====================================== */

.almaz-homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ---------- COMMON ---------- */

.almaz-home-section {
    display: grid;
    gap: 60px;
    align-items: center;
    margin-bottom: 110px;
}

.almaz-home-text {
    display: flex;
    flex-direction: column;
}

.almaz-home-text h2 {
    font-size: 26px;
    margin-bottom: 18px;
}

.almaz-home-note {
    font-size: 16px;
    color: #775441;
    font-weight: 500;
    margin-top: 8px;
}

/* ---------- HERO ---------- */

.almaz-home-hero {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 48px;
    align-items: center;

    padding: 40px 48px;
    border-radius: 10px;
    margin-bottom: 90px;

     background: #F8F8F8;

     /* border: 1px solid #775441; */
}




.almaz-home-hero-image img {
    width: 100%;
    height: 210px;
    object-fit: contain;
    border-radius: 6px;
}


.almaz-home-hero h1 {
    font-size: 38px;
}

.almaz-home-hero-subtitle {
    font-size: 20px;
    margin: 10px 0 20px;
}



/* Primary brand button */

.almaz-home-btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 24px;
    /* background: linear-gradient(135deg,#F8BF02,#ffd84a); */
    border: 2px solid #775441;
    color:#775441;
    font-weight:600;
    border-radius:8px;
    text-decoration:none;

    transition: transform .2s ease, box-shadow .2s ease;
}

.almaz-home-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

/* ---------- BUY ---------- */

.almaz-home-buy {
    grid-template-columns: 1fr 420px;
}

.almaz-home-buy-side img {
    width:100%;
    height:260px;
    object-fit:contain;
    border-radius:8px;
}

/* ---------- DELIVERY ---------- */

.almaz-home-delivery {
    grid-template-columns: 420px 1fr;
    gap:140px;
    padding-left:80px;
}

.almaz-home-delivery-image img {
    width:100%;
    height:270px;
    object-fit: contain;
    border-radius:8px;
}

/* ---------- SELL ---------- */

.almaz-home-sell {
    grid-template-columns:1fr 380px;
}

.almaz-home-sell-image img {
    width:100%;
    height:300px;
    object-fit:contain;
    border-radius:8px;
}

/* ---------- CATALOG ---------- */

.almaz-home-catalog {
    grid-template-columns:420px 1fr;
    padding-left:80px;
}

.almaz-home-catalog-image img {
    width:100%;
    height:250px;
    object-fit:contain;
    border-radius:8px;
}

/* excluding HERO section */

.almaz-home-btn {
    margin-top:20px;
    display:inline-block;

    font-size:13px;
    font-weight:700;
    letter-spacing:0.01em;
    text-transform:uppercase;

    color:#775441;
    text-decoration:none;
    position:relative;
}

/* underline indicator */

.almaz-home-btn::after {
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:100%;
    height:1px;
    background:#775441;
    opacity:.4;
    transition:.25s ease;
}

.almaz-home-btn:hover::after {
    opacity:1;
    transform:translateY(2px);
}

.almaz-home-btn:hover {
    color:#5f4032;
}

/* ---------- MOBILE ---------- */

@media(max-width:900px){

    .almaz-home-hero,
    .almaz-home-section{
        grid-template-columns:1fr;
        padding-left:0;
    }

    .almaz-home-hero h1{
        font-size:30px;
    }

}
/* ======================================
   TEXT SIZE TUNING — BELOW HERO
====================================== */

.almaz-home-section {
    font-size: 17px;
}


.almaz-home-text h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #775441;
}


.almaz-home-text h2 {
    margin-bottom: 22px;
}



.almaz-home-section {
    margin-bottom: 70px;
}


.almaz-home-hero h1 {
    letter-spacing: -0.02em;
    color: #775441;
    line-height: 1em;
}


/* ======================================
   MOBILE FIX — TEXT FIRST, IMAGE SECOND
====================================== */

@media (max-width: 900px) {

    /* General layout logic */
    .almaz-home-section {
        display: flex;
        flex-direction: column;
    }

    /* Text always first */
    .almaz-home-text {
        order: 1;
    }

    /* Images always after text */
    .almaz-home-buy-side,
    .almaz-home-delivery-image,
    .almaz-home-sell-image,
    .almaz-home-catalog-image {
        order: 2;
    }

    /* Remove unnecessary offsets */
    .almaz-home-delivery,
    .almaz-home-catalog {
        padding-left: 0;
    }
}


/* ======================================
   MOBILE SPACING FIX — HOME PAGE
====================================== */

@media (max-width: 900px) {

    /* Reduce section spacing */
    .almaz-home-section {
        gap: 20px;              /* было 60 */
        margin-bottom: 5px;    /* было 70 */
    }

    /* Text to image spacing */
    .almaz-home-text {
        margin-bottom: 8px;
    }

    /* Prevent image separation */
    .almaz-home-buy-side img,
    .almaz-home-delivery-image img,
    .almaz-home-sell-image img,
    .almaz-home-catalog-image img {
        margin-top: 0;
    }

    /* Reduce HERO spacing */
    .almaz-home-hero {
        padding: 28px 24px;
        margin-bottom: 48px;
    }
}




/* ======================================
   MOBILE TYPO + HEADER → IMAGE FIX
====================================== */

@media (max-width: 900px) {

    /* Primary text */
    .almaz-home-section {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Section headings */
    .almaz-home-text h2 {
        font-size: 22px;        /* было 28 */
        line-height: 1.25;
        margin-bottom: 10px;   /* Critical adjustment */
        letter-spacing: 0.01em;
    }

    /* Remove extra spacing before image */
    .almaz-home-text {
        margin-bottom: 0;
    }

    /* More compact text spacing */
    .almaz-home-hero h1 {
        font-size: 28px;
        line-height: 1.1;
    }

    .almaz-home-hero-subtitle {
        font-size: 17px;
        margin-bottom: 14px;
    }
}


/* ======================================
   HERO — MOBILE & TABLET TUNING
====================================== */

/* Center HERO content */
@media (max-width: 600px) {

    .almaz-home-hero {
        justify-items: center;      /* центрируем grid-элементы */
        text-align: center;         /* Allowed on mobile */
    }

    .almaz-home-hero-content {
        align-items: center;        /* Center text column */
    }

    .almaz-home-btn-main {
        align-self: center;         /* Center button alignment */
    }
}

/* Align button to the right */
@media (min-width: 601px) and (max-width: 900px) {

    .almaz-home-hero-content {
        align-items: flex-start;    /* Keep text aligned left */
    }

    .almaz-home-btn-main {
        align-self: flex-end;       /* Move button to right */
    }
}


/* ======================================
   HERO — MOBILE & TABLET TUNING
====================================== */

/* Center HERO content */
@media (max-width: 600px) {

    .almaz-home-hero {
        justify-items: center;      /* центрируем grid-элементы */
        text-align: center;         /* Allowed on mobile */
    }

    .almaz-home-hero-content {
        align-items: center;        /* Center text column */
    }

    .almaz-home-btn-main {
        align-self: center;         /* Center button alignment */
    }
}

/* Align button to the right */
@media (min-width: 601px) and (max-width: 900px) {

    .almaz-home-hero-content {
        align-items: flex-start;    /* Keep text aligned left */
    }

    .almaz-home-btn-main {
        align-self: flex-end;       /* Move button to right */
    }
}


/* ======================================
   HERO & SECTIONS — MOBILE SPACING FIX
====================================== */

@media (max-width: 600px) {

    /* Heading to image spacing */
    .almaz-home-text h2 {
        margin-bottom: 8px;      /* было 22 */
    }

    /* HERO heading to image spacing */
    .almaz-home-hero h1 {
        margin-bottom: 6px;
    }

    .almaz-home-hero-subtitle {
        margin-bottom: 12px;     /* было 20 */
    }

    /* Reduce HERO internal spacing */
    .almaz-home-hero {
        gap: 16px;               /* было 20 */
    }

    /* General section spacing */
    .almaz-home-section {
        gap: 16px;
    }
}


/* ======================================
   HERO — TABLET CENTER ALIGN
====================================== */

@media (min-width: 601px) and (max-width: 900px) {

    /* Center HERO content */
    .almaz-home-hero {
        justify-items: center;
        text-align: center;
    }

    /* Center text block */
    .almaz-home-hero-content {
        align-items: center;
        width: 100%;
    }

    /* Heading alignment */
    .almaz-home-hero h1 {
        text-align: center;
    }

    /* Subtitle alignment */
    .almaz-home-hero-subtitle {
        text-align: center;
    }

    /* Center button alignment */
    .almaz-home-btn-main {
        align-self: center;
    }
}


/* ======================================
   INLINE CTA — TEXT BACKGROUND (FINAL)
====================================== */

.almaz-home-btn {
    display: inline;          /* принципиально */
    text-decoration: none;
    color: #775441;
}

/* Background applied only to text */
.almaz-home-btn-text {
    display: inline-block;    /* ключ */
    padding: 4px 8px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
	/* background-color: rgba(119, 84, 65, 0.070); */
    border-radius: 4px;
	/* border: 2px solid rgba(119, 84, 65, 0.070); */

    transition: background-color .2s ease, color .2s ease;
}

.almaz-home-btn:hover .almaz-home-btn-text {
    background-color: rgba(119, 84, 65, 0.10);
    color: #5f4032;
}


/* ======================================
   CTA — TOUCH DEVICES BACKGROUND
====================================== */

@media (hover: none) {

    .almaz-home-btn-text {
        background-color: rgba(119, 84, 65, 0.085);
        color: #775441;
    }
}



/* ======================================
   FULL SERVICE — FINAL BLOCK
====================================== */

.almaz-home-fullservice {
    grid-template-columns: 1fr 420px;
}

.almaz-home-fullservice-image img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 8px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 900px) {

    .almaz-home-fullservice {
        grid-template-columns: 1fr;
    }

    .almaz-home-fullservice-image {
        order: 2;
    }
}
