/* ============================================
   HARISON HOMES - Enhanced UX & Spacing
   Better visual hierarchy, responsive improvements
   ============================================ */

/* -------------------- Enhanced Typography -------------------- */

/* Better text contrast and readability */
body {
    line-height: 1.65;
    letter-spacing: 0.3px;
}

p {
    margin-bottom: 1.25rem;
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    margin-top: 0;
}

/* -------------------- Improved Spacing -------------------- */

/* Section spacing enhancements */
.section {
    padding: clamp(2rem, 5vw, 6rem) 0;
}

.section-header {
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.card {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.15);
}

/* Better input spacing */
.form-group + .form-group {
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* -------------------- Improved Navigation -------------------- */

/* Better mobile menu spacing */
.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav-link {
    padding: 1rem var(--spacing-lg);
    display: block;
    border-bottom: 1px solid var(--color-gray-100);
    transition: background 0.2s;
}

.mobile-nav-link:active {
    background: var(--color-gray-50);
}

/* Improved button sizing */
.btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-3px);
}

/* -------------------- Card Improvements -------------------- */

.card-content {
    padding: 1.75rem;
}

.card-title {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.card-description {
    color: var(--color-gray-600);
    line-height: 1.65;
}

/* -------------------- Form Improvements -------------------- */

/* Enhanced form input appearance */
.form-input,
.form-textarea,
.form-select {
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--color-gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error,
.form-success {
    font-weight: 500;
    margin-top: 0.5rem;
    display: none;
}

/* -------------------- CTA Buttons -------------------- */

.hero-cta {
    margin-top: 2rem;
}

.header-cta {
    transition: all 0.3s ease;
}

.header-cta:active {
    transform: scale(0.98);
}

/* -------------------- Improved Animations -------------------- */

/* Fade and slide animations */
.animate-fade-up {
    animation: fadeUpSmooth 0.6s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

.animate-fade-down {
    animation: fadeDownSmooth 0.6s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

.animate-fade-left {
    animation: fadeLeftSmooth 0.6s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

.animate-fade-right {
    animation: fadeRightSmooth 0.6s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

@keyframes fadeUpSmooth {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDownSmooth {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeftSmooth {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRightSmooth {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

/* -------------------- Hero Section Improvements -------------------- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 10;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.35rem);
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------- Blog & Article Improvements -------------------- */

.blog-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.blog-card img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-excerpt {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin: 1rem 0;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* -------------------- Contact Section Improvements -------------------- */

.contact-form-wrapper {
    background: var(--color-gray-50);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
}

.contact-info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.contact-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-info-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-info-text p {
    margin: 0;
    line-height: 1.6;
}

.contact-info-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-info-text a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* -------------------- Responsive Improvements -------------------- */

/* Mobile-first approach */
@media (max-width: 640px) {
    :root {
        --container-padding: 1rem;
        --spacing-lg: 1.25rem;
    }

    body {
        font-size: 15px;
    }

    .section {
        padding: 2rem 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

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

    .hero-content {
        padding: 1rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

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

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px;
        padding: 0.875rem;
    }

    .mobile-nav-link {
        padding: 0.875rem var(--spacing-lg);
        font-size: 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
        min-width: 100%;
    }

    .btn-outline {
        border-width: 2px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-item {
        gap: 1rem;
    }

    .contact-info-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .header-cta {
        display: none;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-header {
        padding: 3rem 0;
    }

    .page-header h1 {
        font-size: 1.875rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .card:hover {
        transform: translateY(-8px);
    }

    .tooltip {
        font-size: 0.875rem;
    }

    .breadcrumb {
        font-size: 0.8125rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }

    /* Improve tap targets for touch */
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link::after {
        display: none;
    }

    /* Prevent horizontal scroll on mobile */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Tablet improvements */
@media (min-width: 641px) and (max-width: 1024px) {
    :root {
        --container-padding: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 3rem;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .card:hover {
        transform: translateY(-10px);
    }
}

/* Desktop improvements */
@media (min-width: 1025px) {
    :root {
        --container-padding: 2rem;
    }

    .section {
        padding: 5rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .animate-fade-left,
    .animate-fade-right {
        opacity: 0;
        animation-play-state: paused;
    }

    .animate-fade-left.in-view,
    .animate-fade-right.in-view {
        animation-play-state: running;
    }

    .card:hover {
        transform: translateY(-12px);
        box-shadow: 0 25px 40px rgba(0, 0, 0, 0.15);
    }

    .header-cta {
        display: inline-flex;
    }
}

/* -------------------- Footer Improvements -------------------- */

.footer {
    padding: 3rem 0 1rem;
    background: var(--color-gray-50);
}

.footer-link {
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--color-secondary);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* -------------------- Print Styles -------------------- */

@media print {
    .header,
    .footer,
    .mobile-menu-btn,
    .theme-toggle {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        border: 1px solid #000;
        color: #000;
        background: none;
    }
}

/* -------------------- Utilities -------------------- */

.max-width-lg {
    max-width: 800px;
}

.max-width-xl {
    max-width: 1000px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.opacity-low {
    opacity: 0.7;
}

.opacity-medium {
    opacity: 0.8;
}

.text-muted {
    color: var(--color-gray-500);
}
