/* CSS Document - Fincas Lloreda */

/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
:root {
    --primary: #00528a;
    --secondary: #ee7623;
    --tertiary: #97c1e0;
    --bg1: #e5e5e5;
    --bg2: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg1);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

/* ==========================================================================
   2. TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 15px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background-color: var(--secondary);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2:after {
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================================================
   3. COMPONENTES REUTILIZABLES
   ========================================================================== */
.btn {
    display: inline-block;
    background-color: var(--secondary);
    color: white !important;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn:hover {
    background-color: #d8691e;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: #00406e;
}

/* ==========================================================================
   4. HEADER Y NAVEGACIÓN
   ========================================================================== */
header {
    background-color: var(--bg2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

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

.logo img {
    width: 230px;
    height: auto;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0;
}

.logo span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--secondary);
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary);
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0068af 100%);
    color: white;
    padding: 150px 0 100px;
    margin-top: 70px;
    text-align: center;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.9);
}

.hero .btn {
    margin-top: 20px;
}

/* ==========================================================================
   6. SECCIONES OCULTAS/MOSTRADAS
   ========================================================================== */
.hidden-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   7. CARACTERÍSTICAS (¿POR QUÉ ELEGIRNOS?)
   ========================================================================== */
.features {
    background-color: var(--bg2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease-in-out;
    text-align: center;
    transform: scale(1.0);
}

.feature-card:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--tertiary);
    margin-bottom: 20px;
}

/* ==========================================================================
   8. CONÓCENOS
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   9. SERVICIOS
   ========================================================================== */
.services {
    background-color: var(--bg2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    border-left: 5px solid var(--secondary);
}

.service-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* ==========================================================================
   10. CONTACTO
   ========================================================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    background-color: var(--primary);
    color: white;
    padding: 40px;
    border-radius: 8px;
}

.contact-info h3 {
    color: white;
    margin-bottom: 30px;
}

.contact-info h4 {
    margin-bottom: 2px;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.6);
}

.contact-info a {
    font-weight: bold;
    color: var(--secondary);
}

.contact-info a:hover {
    text-decoration: none;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    font-size: 1.2rem;
    color: var(--tertiary);
    margin-right: 15px;
    width: 25px;
}

.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 118, 35, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input {
    margin-top: 5px;
    margin-right: 10px;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 0.9rem;
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
footer {
    background-color: var(--primary);
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-content .footer-logo img {
	width:100%;
	height:auto;
}
.footer-logo h2 {
    color: white;
    margin-bottom: 20px;
}

.footer-logo h2:after {
    background-color: var(--secondary);
}

.footer-links h3,
.footer-contact h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-content a {
    font-weight: bold;
    color: var(--secondary);
}

.footer-content a:hover {
    text-decoration: none;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

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

.copyright p {
    color: rgba(255, 255, 255, 0.4);
}

.copyright a {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
}

.copyright a:hover {
    text-decoration: none;
    color: #fff;
}

/* ==========================================================================
   12. LIGHTBOX AVISO LEGAL
   ========================================================================== */
.legal-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

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

.legal-content {
    position: relative;
    background-color: var(--bg2);
    margin: 50px auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    height:calc(90vh - 40px);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

.legal-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}

.legal-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.legal-header h2:after {
    display: none;
}

.legal-body {
    line-height: 1.8;
    color: var(--text);
    max-height: calc(50vh - 100px);
    overflow-y: auto;
    padding-right: 10px;
}

.legal-body h3 {
    color: var(--primary);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.legal-body h4 {
    color: var(--secondary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.legal-body p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.legal-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-body li {
    margin-bottom: 8px;
    color: var(--text-light);
}

.legal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.legal-close:hover {
    background-color: #d8691e;
    transform: rotate(90deg);
}

.legal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
	position:absolute;
	bottom:20px;
	width:calc(100% - 80px);
}
.legal-footer p {
	margin-bottom:5px;
}

.legal-link {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.legal-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Scrollbar personalizado para legal-body */
.legal-body::-webkit-scrollbar {
    width: 8px;
}

.legal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.legal-body::-webkit-scrollbar-thumb {
    background: var(--tertiary);
    border-radius: 4px;
}

.legal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   13. ANIMACIONES
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.8s ease forwards;
}

/* ==========================================================================
   14. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet (992px y menos) */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

/* Móvil Grande (768px y menos) */
@media (max-width: 768px) {
    /* Navegación */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg2);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: var(--transition);
    }

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

    .nav-menu li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 120px 0 80px;
    }

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

    /* Tipografía */
    h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Espaciado secciones */
    section {
        padding: 60px 0;
    }

    /* Lightbox */
    .legal-content {
        padding: 30px 20px;
        margin: 20px auto;
        width: 95%;
		height: calc(94vh);
    }

    .legal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

/* Móvil Pequeño (576px y menos) */
@media (max-width: 576px) {
    /* Grids */
    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }

    /* Formularios */
    .contact-form,
    .contact-info {
        padding: 30px 20px;
    }
}

/* Ajustes específicos para móviles muy pequeños */
@media (max-width: 400px) {
    .logo img {
        width: 180px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}