/* ========================================
   Econ Windows - Main Stylesheet
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors */
    --color-primary: #D97638;
    --color-secondary: #8B4513;
    --color-accent: #F4A460;
    
    /* Neutral Colors */
    --color-dark: #2C3E50;
    --color-medium: #7F8C8D;
    --color-light: #ECF0F1;
    --color-white: #FFFFFF;
    
    /* Semantic Colors */
    --color-success: #27AE60;
    --color-error: #E74C3C;
    --color-warning: #F39C12;
    --color-info: #3498DB;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Font Sizes */
    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.75rem;
    --fs-h4: 1.375rem;
    --fs-body: 1rem;
    --fs-small: 0.875rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Header Height */
    --header-height: 80px;
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

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

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

/* ========== Reusable Classes ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xxl) 0;
}

.section--gray {
    background-color: var(--color-light);
}

.section--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section__header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section__title {
    margin-bottom: var(--spacing-sm);
}

.section__subtitle {
    font-size: var(--fs-h4);
    color: var(--color-medium);
    font-weight: 400;
}

/* ========== Buttons ========== */
.button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--fs-body);
    transition: var(--transition);
    cursor: pointer;
}

.button--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}

.button--primary:hover {
    background-color: #c26830;
    border-color: #c26830;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.button--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.button--white {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-white);
}

.button--white:hover {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.button--outline-white {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.button--outline-white:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* ========== Header & Navigation ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo img {
    height: 50px;
    width: auto;
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav__link {
    font-weight: 600;
    color: var(--color-dark);
    padding: var(--spacing-xs) 0;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

.nav__link--payment {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
}

.nav__link--payment:hover {
    background-color: #c26830;
}

.nav__link--payment::after {
    display: none;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav__phone {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--fs-body);
}

.nav__phone i {
    font-size: 1.25rem;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== Hero Section ========== */
.hero {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(139, 69, 19, 0.6)),
                url('../images/hero/scottsdale-sunset.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

/* WebP support for hero background */
.webp .hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(139, 69, 19, 0.6)),
                url('../images/hero/scottsdale-sunset-1920.webp') center/cover no-repeat;
}

/* Responsive WebP backgrounds */
@media screen and (max-width: 1200px) {
    .webp .hero {
        background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(139, 69, 19, 0.6)),
                    url('../images/hero/scottsdale-sunset-1200.webp') center/cover no-repeat;
    }
}

@media screen and (max-width: 800px) {
    .webp .hero {
        background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(139, 69, 19, 0.6)),
                    url('../images/hero/scottsdale-sunset-800.webp') center/cover no-repeat;
    }
}

.hero__container {
    width: 100%;
}

.hero__content {
    max-width: 700px;
    color: var(--color-white);
}

.hero__title {
    font-size: var(--fs-h1);
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.hero__description {
    font-size: var(--fs-h4);
    margin-bottom: var(--spacing-lg);
    color: var(--color-light);
}

.hero__buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ========== Services Section ========== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.service__card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service__card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service__image {
    height: 250px;
    overflow: hidden;
}

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

.service__card:hover .service__image img {
    transform: scale(1.1);
}

.service__content {
    padding: var(--spacing-lg);
}

.service__icon {
    width: 60px;
    height: 60px;
    background-color: rgba(217, 118, 56, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.service__icon i {
    font-size: 1.75rem;
    color: var(--color-primary);
}

.service__title {
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.service__description {
    color: var(--color-medium);
    margin-bottom: var(--spacing-md);
}

.service__features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.service__features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-dark);
    font-size: var(--fs-small);
}

.service__features i {
    color: var(--color-success);
    font-size: 0.75rem;
}

/* ========== Features Grid ========== */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature__item {
    text-align: center;
    padding: var(--spacing-lg);
}

.feature__icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.feature__icon i {
    font-size: 2rem;
    color: var(--color-primary);
}

.feature__title {
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.feature__description {
    color: var(--color-medium);
}

/* ========== About Section ========== */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about__content {
    padding-right: var(--spacing-lg);
}

.about__text {
    margin-bottom: var(--spacing-md);
    color: var(--color-medium);
    line-height: 1.8;
}

.about__highlights {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.highlight__item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-dark);
    font-weight: 600;
}

.highlight__item i {
    color: var(--color-success);
    font-size: 1.25rem;
}

.about__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== CTA Section ========== */
.cta__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta__title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.cta__description {
    font-size: var(--fs-h4);
    margin-bottom: var(--spacing-lg);
    color: var(--color-light);
}

.cta__buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Contact Section ========== */
.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact__item {
    display: flex;
    gap: var(--spacing-md);
}

.contact__icon {
    width: 50px;
    height: 50px;
    background-color: rgba(217, 118, 56, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact__icon i {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.contact__details h3 {
    font-size: var(--fs-h4);
    margin-bottom: var(--spacing-xs);
}

.contact__details p,
.contact__details a {
    color: var(--color-medium);
    line-height: 1.8;
}

.contact__details a:hover {
    color: var(--color-primary);
}

/* ========== Contact Form ========== */
.contact__form-container {
    background-color: var(--color-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.form__group {
    margin-bottom: var(--spacing-md);
}

.form__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    transition: var(--transition);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(217, 118, 56, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__input::placeholder {
    color: var(--color-medium);
}

/* ========== Footer ========== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer__logo img {
    height: 50px;
    margin-bottom: var(--spacing-md);
}

.footer__description {
    color: var(--color-medium);
    line-height: 1.8;
}

.footer__title {
    font-size: var(--fs-h4);
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
}

.footer__links,
.footer__contact,
.footer__hours {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer__links a:hover {
    color: var(--color-primary);
}

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.footer__contact i {
    color: var(--color-primary);
    margin-top: 4px;
}

.footer__contact a:hover {
    color: var(--color-primary);
}

.footer__hours--closed {
    color: var(--color-medium);
    font-style: italic;
}

.footer__bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__copyright {
    color: var(--color-medium);
    font-size: var(--fs-small);
}

/* ========== Scroll to Top Button ========== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top:hover {
    background-color: #c26830;
    transform: translateY(-5px);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

/* ========== Responsive Design ========== */

/* Tablet - 768px to 1023px */
@media screen and (max-width: 1024px) {
    :root {
        --fs-h1: 2.5rem;
        --fs-h2: 2rem;
        --fs-h3: 1.5rem;
        --fs-h4: 1.25rem;
    }
    
    .about__container,
    .contact__container {
        grid-template-columns: 1fr;
    }
    
    .about__content {
        padding-right: 0;
    }
    
    .services__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Mobile - Up to 767px */
@media screen and (max-width: 768px) {
    :root {
        --fs-h1: 2rem;
        --fs-h2: 1.75rem;
        --fs-h3: 1.375rem;
        --fs-h4: 1.125rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Mobile Navigation */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--color-white);
        padding: var(--spacing-xxl) var(--spacing-lg);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav__menu.show-menu {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .nav__close {
        display: block;
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
        font-size: 2rem;
        color: var(--color-dark);
    }
    
    .nav__toggle {
        display: block;
        color: var(--color-dark);
    }
    
    .nav__phone span {
        display: none;
    }
    
    /* Hero Section */
    .hero__buttons {
        flex-direction: column;
    }
    
    /* Swap button styles on mobile - Make Payment primary, Get Quote secondary */
    .hero__buttons .button--primary {
        background-color: transparent;
        color: var(--color-primary);
        border: 2px solid var(--color-primary);
    }
    
    .hero__buttons .button--primary:hover {
        background-color: var(--color-primary);
        color: var(--color-white);
    }
    
    .hero__buttons .button--secondary {
        background-color: var(--color-primary);
        color: var(--color-white);
        border: 2px solid var(--color-primary);
    }
    
    .hero__buttons .button--secondary:hover {
        background-color: #c26830;
        border-color: #c26830;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
    
    .button {
        width: 100%;
        justify-content: center;
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: 1fr;
    }
    
    /* Features */
    .features__grid {
        grid-template-columns: 1fr;
    }
    
    /* CTA */
    .cta__buttons {
        flex-direction: column;
    }
    
    /* Contact */
    .contact__container {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer__container {
        grid-template-columns: 1fr;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Small Mobile - Up to 480px */
@media screen and (max-width: 480px) {
    :root {
        --fs-h1: 1.75rem;
        --fs-h2: 1.5rem;
    }
    
    .nav__menu {
        width: 100%;
    }
    
    .hero__title {
        font-size: 1.75rem;
    }
    
    .hero__description {
        font-size: 1rem;
    }
}