/*
 Theme Name:   GeneratePress Child - Immobiliare
 Theme URI:    https://luigibenedetti.it
 Description:  Child theme di GeneratePress ottimizzato per Easy Property Listings - Sito intermediazione immobiliare
 Author:       Luigi Benedetti
 Author URI:   https://luigibenedetti.it
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  generatepress-child
 Domain Path:  /languages
*/

/* ==========================================================================
   VARIABILI CSS PERSONALIZZABILI
   ========================================================================== */

:root {
    /* Colori principali - personalizza questi valori */
    --epl-primary: #2c5282;        /* Blu professionale */
    --epl-primary-dark: #1a365d;   /* Blu scuro */
    --epl-primary-light: #4299e1;  /* Blu chiaro */
    --epl-accent: #ed8936;         /* Arancione per CTA */
    --epl-accent-dark: #dd6b20;    /* Arancione scuro */

    /* Colori di stato */
    --epl-success: #38a169;        /* Verde - Disponibile */
    --epl-warning: #ecc94b;        /* Giallo - In trattativa */
    --epl-danger: #e53e3e;         /* Rosso - Venduto/Affittato */

    /* Colori neutri */
    --epl-text: #2d3748;
    --epl-text-light: #718096;
    --epl-border: #e2e8f0;
    --epl-bg-light: #f7fafc;
    --epl-white: #ffffff;

    /* Spaziature */
    --epl-spacing-xs: 0.5rem;
    --epl-spacing-sm: 1rem;
    --epl-spacing-md: 1.5rem;
    --epl-spacing-lg: 2rem;
    --epl-spacing-xl: 3rem;

    /* Border radius */
    --epl-radius: 8px;
    --epl-radius-lg: 12px;

    /* Ombre */
    --epl-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --epl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --epl-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   IMPORTA CSS AGGIUNTIVI
   ========================================================================== */

@import url('assets/css/epl-custom.css');

/* ==========================================================================
   STILI FOOTER
   ========================================================================== */

.site-footer {
    position: relative;
    color: var(--epl-white);
}

/* Sfondo blu a tutta larghezza */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-color: var(--epl-primary);
    z-index: -1;
}

.site-footer .site-info {
    background-color: transparent;
}

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

.site-footer a:hover {
    color: var(--epl-primary-light);
}

/* ==========================================================================
   FOOTER PERSONALIZZATO
   ========================================================================== */

/* Contenitori wrapper al 100% */
.footer-bar,
.footer-bar .widget,
.footer-bar .widget_block {
    width: 100%;
}

.gpc-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1.5rem;
    padding: var(--epl-spacing-sm) 0;
    color: var(--epl-white);
}

/* Sinistra - Logo e copyright */
.gpc-footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
}

.gpc-footer-logo {
    width: 240px;
    height: auto;
    filter: brightness(0) invert(1);
}

.gpc-footer-copyright {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Centro - Info azienda */
.gpc-footer-center {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
}

.gpc-footer-center strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.gpc-footer-center span {
    opacity: 0.85;
}

/* Destra - Pulsanti telefono */
.gpc-footer-right {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.gpc-footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--epl-radius);
    color: var(--epl-white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpc-footer-phone:hover {
    background: var(--epl-white);
    color: var(--epl-primary);
    border-color: var(--epl-white);
    text-decoration: none;
}

a.gpc-footer-phone {
    text-decoration: none;
}

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

.gpc-footer-phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gpc-footer-phone a {
    color: var(--epl-white);
    text-decoration: none;
}

.gpc-footer-phone.phone-visible {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive footer */
@media (max-width: 900px) {
    .gpc-footer-content {
        flex-direction: column;
        text-align: center;
    }

    .gpc-footer-left,
    .gpc-footer-center,
    .gpc-footer-right {
        flex: none;
        justify-content: center;
    }

    .gpc-footer-left {
        align-items: center;
    }

    .gpc-footer-logo {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .gpc-footer-right {
        flex-direction: column;
        width: 100%;
    }

    .gpc-footer-phone {
        justify-content: center;
    }

    .gpc-footer-logo {
        width: 160px;
    }
}

/* ==========================================================================
   STILI FORM CONTATTO
   ========================================================================== */

.gpc-form-field {
    margin-bottom: var(--epl-spacing-sm);
}

.gpc-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.gpc-form-field input,
.gpc-form-field select,
.gpc-form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gpc-form-field input:focus,
.gpc-form-field select:focus,
.gpc-form-field textarea:focus {
    outline: none;
    border-color: var(--epl-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.gpc-form-response {
    padding: var(--epl-spacing-sm);
    border-radius: var(--epl-radius);
    margin-bottom: var(--epl-spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.gpc-form-response.gpc-form-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gpc-form-response.gpc-form-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gpc-form-response svg {
    flex-shrink: 0;
}

.gpc-spinner {
    animation: gpc-spin 1s linear infinite;
}

@keyframes gpc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   PULSANTI GALLERY FOTO E PLANIMETRIE
   ========================================================================== */

.gpc-gallery-buttons {
    display: flex;
    gap: var(--epl-spacing-sm);
    margin-top: var(--epl-spacing-sm);
}

.gpc-gallery-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--epl-spacing-sm) var(--epl-spacing-md);
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    border-radius: var(--epl-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.gpc-gallery-btn:hover {
    border-color: var(--epl-primary);
    box-shadow: var(--epl-shadow);
}

.gpc-gallery-btn svg {
    color: var(--epl-primary);
    stroke: var(--epl-primary);
}

.gpc-gallery-btn span {
    font-size: 0.85rem;
    color: var(--epl-text);
    font-weight: 500;
}

/* ==========================================================================
   SEZIONE PLANIMETRIE
   ========================================================================== */

.gpc-floorplans-section {
    margin-top: var(--epl-spacing-lg);
}

.gpc-floorplans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--epl-spacing-md);
}

.gpc-floorplan-item {
    position: relative;
    border-radius: var(--epl-radius);
    overflow: hidden;
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    transition: all 0.2s ease;
}

.gpc-floorplan-item:hover {
    box-shadow: var(--epl-shadow);
    border-color: var(--epl-primary);
}

.gpc-floorplan-item a {
    display: block;
    text-decoration: none;
}

.gpc-floorplan-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gpc-floorplan-caption {
    display: block;
    padding: var(--epl-spacing-xs) var(--epl-spacing-sm);
    font-size: 0.85rem;
    color: var(--epl-text);
    text-align: center;
    background: var(--epl-light);
}

/* ==========================================================================
   SEZIONE VIDEO
   ========================================================================== */

.gpc-videos-section {
    margin-top: var(--epl-spacing-lg);
}

.gpc-videos-section .gpc-section-title {
    display: flex;
    align-items: center;
}

.gpc-videos-section .gpc-section-title svg {
    color: var(--epl-primary);
}

.gpc-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--epl-spacing-md);
}

.gpc-video-item {
    position: relative;
    border-radius: var(--epl-radius);
    overflow: hidden;
    background: var(--epl-white);
    border: 1px solid var(--epl-border);
    transition: all 0.2s ease;
}

.gpc-video-item:hover {
    box-shadow: var(--epl-shadow);
    border-color: var(--epl-primary);
}

.gpc-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.gpc-video-wrapper video,
.gpc-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.gpc-video-wrapper video {
    object-fit: contain;
    background: #000;
}

.gpc-video-caption {
    display: block;
    padding: var(--epl-spacing-xs) var(--epl-spacing-sm);
    font-size: 0.85rem;
    color: var(--epl-text);
    text-align: center;
    background: var(--epl-light);
}

/* Video singolo - larghezza piena */
.gpc-videos-grid:has(.gpc-video-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* Responsive video */
@media (max-width: 768px) {
    .gpc-videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   OVERRIDE STILI CARATTERISTICHE E META
   ========================================================================== */

/* Quick Features - icone principali sopra "Annuncio aggiornato" */
.gpc-single-listing .gpc-quick-features {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px 32px !important;
    padding: 16px 0 !important;
    flex-wrap: nowrap !important;
}

.gpc-single-listing .gpc-quick-feature {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

.gpc-single-listing .gpc-quick-feature svg {
    color: #333 !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    height: 22px !important;
}

.gpc-single-listing .gpc-quick-feature.feature-lusso {
    color: #c4a000 !important;
}

.gpc-single-listing .gpc-quick-feature.feature-lusso svg {
    color: #c4a000 !important;
    fill: #c4a000 !important;
}

/* Responsive quick features */
@media (max-width: 768px) {
    .gpc-single-listing .gpc-quick-features {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px 24px !important;
    }
}

@media (max-width: 480px) {
    .gpc-single-listing .gpc-quick-features {
        grid-template-columns: 1fr !important;
    }
}

/* Meta info "Annuncio aggiornato" - più grande con border sopra e sotto */
.gpc-single-listing .gpc-listing-meta {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #666 !important;
    font-size: 15px !important;
    padding: 20px 0 !important;
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    margin-top: 16px !important;
}

.gpc-single-listing .gpc-listing-meta svg {
    color: #999 !important;
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
}

/* Sezione Caratteristiche - senza border, griglia pulita */
.gpc-single-listing .gpc-features-section.gpc-section {
    border-bottom: none !important;
    padding-bottom: 16px !important;
}

.gpc-single-listing .gpc-features-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 40px !important;
}

.gpc-single-listing .gpc-features-grid .gpc-feature-row {
    display: grid !important;
    grid-template-columns: 24px 1fr auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    border: none !important;
}

.gpc-single-listing .gpc-features-grid .gpc-feature-row:nth-child(odd),
.gpc-single-listing .gpc-features-grid .gpc-feature-row:nth-child(even) {
    padding: 8px 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.gpc-single-listing .gpc-feature-icon {
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.gpc-single-listing .gpc-feature-icon svg {
    width: 22px !important;
    height: 22px !important;
}

.gpc-single-listing .gpc-feature-label {
    font-size: 15px !important;
    color: #333 !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

.gpc-single-listing .gpc-feature-value {
    font-weight: 500 !important;
    color: var(--epl-text) !important;
    text-align: right !important;
}

/* Responsive: 1 colonna su mobile */
@media (max-width: 600px) {
    .gpc-single-listing .gpc-features-grid {
        grid-template-columns: 1fr !important;
        gap: 12px 0 !important;
    }
}

/* Nasconde pulsante "Richiedi visita" - rimuovere per riattivare */
.gpc-request-visit {
    display: none !important;
}

/* ==========================================================================
   SEZIONE COSTI
   ========================================================================== */

.gpc-costs-section {
    margin-top: var(--epl-spacing-lg);
}

.gpc-costs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--epl-spacing-md);
}

.gpc-cost-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--epl-spacing-sm);
    background: var(--epl-bg-light);
    border-radius: var(--epl-radius);
}

.gpc-cost-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--epl-primary);
}

.gpc-cost-icon svg {
    width: 24px;
    height: 24px;
}

.gpc-cost-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gpc-cost-label {
    font-size: 0.85rem;
    color: var(--epl-text-light);
}

.gpc-cost-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--epl-text);
}

@media (max-width: 480px) {
    .gpc-costs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PAGINA CONTATTI
   ========================================================================== */

/* Foto profilo con angoli arrotondati (come nella singola proprietà) */
.foto_luigi img {
    border-radius: var(--epl-radius-lg);
    box-shadow: var(--epl-shadow);
}

/* Container pulsanti telefono nella pagina contatti */
.gb-element-c5f636ac > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--epl-spacing-sm);
}

/* Pulsanti telefono - stile coerente con singola proprietà (.gpc-btn-phone) */
.gb-element-c5f636ac .gpc-footer-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: var(--epl-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gb-element-c5f636ac .gpc-footer-phone:hover {
    background: #eee;
    color: var(--epl-primary);
    border-color: var(--epl-primary);
}

.gb-element-c5f636ac .gpc-footer-phone:hover svg {
    stroke: var(--epl-primary);
}

.gb-element-c5f636ac .gpc-footer-phone svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.gb-element-c5f636ac .gpc-footer-phone.phone-visible {
    background: #e8f5e9;
    border-color: #4caf50;
}

.gb-element-c5f636ac .gpc-footer-phone.phone-visible a {
    color: var(--epl-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Spazio sotto la foto */
.foto_luigi {
    margin-bottom: var(--epl-spacing-md) !important;
}

/* ==========================================================================
   MODULO CONTATTO JETPACK - PAGINA CONTATTI
   ========================================================================== */

/* Container modulo - stile coerente con sidebar proprietà */
.gb-element-c5f636ac .wp-block-jetpack-contact-form-container {
    background: var(--epl-bg-light);
    padding: var(--epl-spacing-lg);
    border-radius: var(--epl-radius-lg);
}

/* Campi input - stile identico a .gpc-form-field */
.gb-element-c5f636ac .wp-block-jetpack-input,
.gb-element-c5f636ac .grunion-field {
    width: 100%;
    padding: 12px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: var(--epl-radius) !important;
    font-size: 14px;
    color: #333;
    background: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gb-element-c5f636ac .wp-block-jetpack-input:focus,
.gb-element-c5f636ac .grunion-field:focus {
    outline: none;
    border-color: var(--epl-primary) !important;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1) !important;
}

/* Labels */
.gb-element-c5f636ac .wp-block-jetpack-label,
.gb-element-c5f636ac .grunion-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

/* Textarea messaggio */
.gb-element-c5f636ac textarea.grunion-field {
    resize: vertical;
    min-height: 120px;
}

/* Campo telefono con prefisso */
.gb-element-c5f636ac .jetpack-field__input-phone-wrapper {
    border-radius: var(--epl-radius) !important;
    border: 1px solid #ddd !important;
    background: #fff;
    overflow: hidden;
}

.gb-element-c5f636ac .jetpack-field__input-phone-wrapper:focus-within {
    border-color: var(--epl-primary) !important;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* Messaggio di errore */
.gb-element-c5f636ac .contact-form__error {
    border-radius: var(--epl-radius);
}

/* Pulsante invio - stile .gpc-btn-primary */
.gb-element-c5f636ac .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px !important;
    background: var(--epl-primary) !important;
    color: #fff !important;
    border: none;
    border-radius: var(--epl-radius) !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gb-element-c5f636ac .wp-block-button__link:hover {
    background: var(--epl-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--epl-shadow);
}

/* ==========================================================================
   PAGINA CONTATTI - RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .gb-element-c5f636ac .wp-block-jetpack-contact-form-container {
        padding: var(--epl-spacing-md);
    }

    .gb-element-c5f636ac .gpc-footer-phone {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .foto_luigi img {
        border-radius: var(--epl-radius);
    }
}

/* ==========================================================================
   STILE TITOLO PAGINE IMMOBILI (VENDITA E AFFITTO)
   ========================================================================== */

#post-986 .entry-title,
#post-1312 .entry-title {
    margin: 0;
    color: var(--epl-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   LOGO HEADER RESPONSIVE
   ========================================================================== */

@media (max-width: 560px) {
    .site-logo img,
    .custom-logo {
        max-width: 240px;
        height: auto;
    }
}
