/**
 * main.css - Core styles for Consultores Hipotecarios La Bufa
 */

/* Header & Navigation */
header {
    background: var(--white);
    padding: 1rem 5%;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary-color);
    font-weight: 400;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(26, 54, 93, 0.8), rgba(26, 54, 93, 0.8)), url('../images/hero-bg.jpg') #1a365d center/cover;
    color: var(--white);
    padding: 0 5%;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: #c19b2e;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--accent-color);
}

/* Sections */
section {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 1rem auto 0;
}

/* Credit Grid */
.credit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.credit-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.credit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.credit-card-img {
    height: 200px;
    background: var(--accent-color);
}

.credit-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.credit-card-body h3 {
    margin-bottom: 0.5rem;
}

.credit-card-body .institution {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.credit-card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Carousel */
.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #edf2f7;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.carousel-slide {
    flex: 0 0 85%;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--secondary-color);
}

@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 30%;
    }
}

/* Contact Form Tweaks */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}