/* ========================================
   YYCHomes.ca - Calgary Real Estate Website
   Modern, SEO-Optimized, Conversion-Focused
   ======================================== */

/* Root Variables */
:root {
    --primary-color: #1a365d;
    --primary-dark: #0f2442;
    --primary-light: #2c5282;
    --accent-color: #ed8936;
    --accent-hover: #dd6b20;
    --text-dark: #1a202c;
    --text-gray: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

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

a:hover {
    color: var(--accent-color);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.logo-accent {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-color);
    color: var(--bg-white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 6px;
}

.nav-cta:hover {
    background: var(--accent-hover);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    margin-top: 70px;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('Calgary.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.9;
    z-index: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--bg-white);
    padding: 4rem 0;
}

.hero-title {
    margin-bottom: 1.5rem;
    color: var(--bg-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-areas {
    font-size: 0.95rem;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto;
}

.hero-areas p {
    color: #ffffff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--bg-white);
}

.btn-secondary {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

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

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

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

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Tips Section */
.tips-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.tip-icon {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.tip-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tip-card ul {
    list-style: none;
    padding-left: 0;
}

.tip-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.tip-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.tip-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.tip-link:hover {
    color: var(--accent-hover);
}

/* Listings Section */
.listings-section {
    padding: 5rem 0;
}

.listings-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.listing-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.listing-card:nth-child(1) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=600&h=400&fit=crop') center/cover;
}

.listing-card:nth-child(2) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?w=600&h=400&fit=crop') center/cover;
}

.listing-card:nth-child(3) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('townhomes.avif') center/cover;
}

.listing-card:nth-child(4) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1558036117-15d82a90b9b1?w=600&h=400&fit=crop') center/cover;
}

.listing-card:nth-child(5) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?w=600&h=400&fit=crop') center/cover;
}

.listing-card:nth-child(6) .listing-image {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=600&h=400&fit=crop') center/cover;
}

.listing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.listing-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--primary-color);
}

.listing-card p {
    padding: 0 1.5rem;
    color: var(--text-gray);
}

.listing-features {
    list-style: none;
    padding: 1rem 1.5rem;
}

.listing-features li {
    padding: 0.25rem 0;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.listing-features li::before {
    content: '• ';
    color: var(--accent-color);
    font-weight: bold;
}

.listing-card .btn {
    margin: 0 1.5rem 1.5rem;
    width: calc(100% - 3rem);
}

.listings-cta {
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.listings-cta h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    position: relative;
    background: url('alighazal.jpg') center/cover;
    height: 400px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-badge {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    white-space: nowrap;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-intro {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.about-highlights {
    margin-bottom: 2rem;
}

.about-highlights h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-highlights ul {
    list-style: none;
}

.about-highlights li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-gray);
}

.about-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.service-item {
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-white);
    border-radius: 8px;
    color: var(--text-dark);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-card blockquote {
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonial-card cite {
    color: var(--primary-color);
    font-weight: 600;
    font-style: normal;
}

/* Contact Form Section */
.contact-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.preference-form {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-submit {
    text-align: center;
    padding-top: 1rem;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Form Success Message */
.form-success-message {
    background: var(--success-color);
    color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
}

.form-success-message h3 {
    color: var(--bg-white);
    margin-bottom: 0.5rem;
}

.form-success-message p {
    color: var(--bg-white);
    margin: 0;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--bg-white);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3,
.footer h4 {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    padding: 0.25rem 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .tips-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        height: 300px;
    }

    .listings-categories {
        grid-template-columns: 1fr;
    }

    .preference-form {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .tip-card,
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-cta,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .tip-card,
    .listing-card {
        page-break-inside: avoid;
    }
}
