/* ===================================
   Cragun Legal - Modern Law Firm Website
   =================================== */

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

:root {
    /* Color Palette */
    --primary-navy: #1a3a52;
    --secondary-gray: #4a5568;
    --accent-gold: #c9a961;
    --white: #ffffff;
    --dark-text: #2d3748;
    --light-bg: #f7fafc;
    --border-color: #e2e8f0;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-max: 1200px;

    /* Transitions */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-navy);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

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

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

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

.section {
    padding: var(--section-padding);
}

/* Header & Navigation */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

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

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

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

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

.phone-link {
    color: var(--primary-navy);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-navy);
    transition: var(--transition);
}

/* CTA Button */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 600;
    text-align: center;
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #b8964d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 169, 97, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2d5a7b 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-estate {
    background: linear-gradient(rgba(26, 58, 82, 0.82), rgba(26, 58, 82, 0.86)), url('../images/estate-planning-hero.png');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    padding: 120px 0;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Service Areas Badge */
.service-areas {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Practice Areas Grid */
.practice-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.practice-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
}

.practice-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.practice-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.practice-card h3 {
    margin-bottom: 1rem;
}

.practice-card p {
    color: var(--secondary-gray);
    margin-bottom: 1.5rem;
}

/* Why Choose Us Section */
.why-choose {
    background-color: var(--light-bg);
}

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

.feature {
    text-align: center;
}

.feature-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-heading);
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--secondary-gray);
}

/* Testimonials Section */
.testimonials {
    background-color: var(--primary-navy);
    color: var(--white);
}

.testimonials h2 {
    color: var(--white);
    text-align: center;
    margin-bottom: 3rem;
}

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

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-gold);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 700;
    color: var(--accent-gold);
}

/* Contact CTA Section */
.contact-cta {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8964d 100%);
    color: var(--white);
    text-align: center;
}

.contact-cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.contact-cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Contact Form */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-top: 0.25rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--white);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* About Page Photo Grid */
.about-intro-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.about-intro-grid img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

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

    .about-intro-grid img {
        max-width: 250px;
        margin: 0 auto;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        padding: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        align-items: flex-start;
    }

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

    .contact-section {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--secondary-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Rating Popup Modal */
.rating-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.rating-popup.active {
    display: flex;
}

.rating-popup-content {
    background-color: var(--white);
    padding: 3rem 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.rating-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-gray);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.rating-popup-close:hover {
    color: var(--primary-navy);
    transform: rotate(90deg);
}

.rating-step {
    display: none;
}

.rating-step.active {
    display: block;
}

.rating-step h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.rating-step p {
    color: var(--secondary-gray);
    margin-bottom: 1.5rem;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.star {
    font-size: 3rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.star.hovered {
    color: var(--accent-gold);
}

.rating-hint {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    font-style: italic;
}

#feedback-form {
    margin-top: 1.5rem;
}

#feedback-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
    transition: var(--transition);
}

#feedback-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive adjustments for rating popup */
@media (max-width: 480px) {
    .rating-popup-content {
        padding: 2rem 1.5rem;
    }

    .star {
        font-size: 2.5rem;
    }

    .rating-step h3 {
        font-size: 1.25rem;
    }
}
