/*
 * Catanzaro Tourism Theme - Layout Component Styles
 * Layout components, grid system, containers, and structural elements
 */

/* ==========================================================================
   Container / grid
   Bootstrap Italia owns .container / .row / .col-*.
   Companion sizes and gutters: base/bootstrap-italia-bridge.css
   ========================================================================== */

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
    padding: var(--space-8) 0;
    min-height: 60vh;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.main-content h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--space-6);
    position: relative;
}

.main-content h2::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--border-radius-full);
}

/* ==========================================================================
   Sidebar Components
   ========================================================================== */

.sidebar-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--primary-color);
    margin-bottom: var(--space-4);
    position: relative;
}

.sidebar-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: var(--border-radius-full);
}

/* ==========================================================================
   Footer Layout
   ========================================================================== */

.site-footer {
    background-color: #eaeaea;
    color: var(--tourism-accent-dark) !important;
    background-image: url('../../images/bg_shapes_footer.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-origin: content-box;
}

/* BI it-footer tokens: keep tourism chrome (bg/color), not BI primary footer palette */
.site-footer.it-footer {
    background-color: #eaeaea;
    color: var(--tourism-accent-dark);
}

.site-footer.it-footer .it-footer-main,
.site-footer.it-footer .it-footer-small-prints {
    background: transparent !important;
    color: inherit;
}

/* BI .it-footer a { color:#fff } — use tourism link blue like production */
.site-footer.it-footer a {
    color: var(--primary-color, #1f3b87);
}

.site-footer.it-footer a:hover {
    color: var(--bs-link-hover-color, #16325e);
}

.site-footer.it-footer .footer-comune-link {
    color: var(--primary-color, #1f3b87);
}

.site-footer.it-footer .footer-designed-by-link {
    color: var(--tourism-accent-dark);
}

.site-footer.it-footer .footer-designed-by-link:hover {
    color: var(--tourism-accent-dark);
}

.site-footer.it-footer .footer-social a {
    color: var(--tourism-white);
}

.site-footer.it-footer .footer-social a:hover {
    color: var(--tourism-primary);
}

/* Legal menu: BI nav-link was collapsing Customizer gap */
.site-footer.it-footer .footer-legal-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
}

.site-footer.it-footer .footer-legal-menu .nav-link {
    display: inline;
    width: auto;
    color: var(--primary-color, #1f3b87);
}

.site-footer.it-footer .footer-legal-menu .nav-link:hover {
    color: var(--bs-link-hover-color, #16325e);
    opacity: 0.7;
}

.footer-main {
    padding: var(--tourism-space-12) 0 var(--tourism-space-8);
}

.footer-content-wrapper {
    width: 100%;
}

.footer-content.row {
    /* Gap owned below; gutters off so columns can size to content like prod grid */
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    min-width: 0;
    flex: 1 1 auto;
}

/* Desktop: content-sized columns + 2rem gap (prod CSS grid auto tracks + gap) */
@media (min-width: 992px) {
    .footer-content.row {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        column-gap: 2rem;
        row-gap: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .footer-content.row > [class*="col"] {
        flex: 0 1 auto !important;
        flex-grow: 0 !important;
        max-width: none !important;
        width: auto !important;
        min-width: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.footer-menu.list-unstyled,
.footer-legal-menu.list-unstyled {
    padding-left: 0;
    margin-bottom: 0;
}

.footer-title {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Slightly tighter social pills so 4 icons fit equal-width columns */
.footer-social a {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.footer-social .social-links {
    flex-wrap: wrap;
}

/* Coat of Arms Section (New Addition) */
.footer-coat-of-arms-section {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-coat-of-arms img {
    max-height: 140px !important;
    width: auto;
    transition: all var(--tourism-transition-normal);
}

.footer-coat-of-arms:hover img {
    transform: scale(1.05);
}

/* Footer Logo Bigger Size */
.footer-logo img {
    max-height: 120px !important;
    width: auto !important;
}

/* Remove wave animations and geometric shapes from footer */
.footer-main .section::before,
.footer-main .section::after,
.footer-main::before,
.footer-main::after {
    display: none !important;
}

/* ==========================================================================
   Footer Social Links
   ========================================================================== */

.footer-social {
    display: flex;
    gap: var(--tourism-space-4);
    align-items: center;
    margin-top: var(--tourism-space-4);
}

.footer-social .social-links {
    display: flex;
    gap: var(--tourism-space-2);
    align-items: center;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--tourism-primary);
    color: var(--tourism-white);
    border-radius: var(--tourism-border-radius-full);
    text-decoration: none;
    transition: all var(--tourism-transition-normal);
    font-size: var(--tourism-text-base);
}

.footer-social a:hover {
    background: var(--tourism-accent-yellow);
    color: var(--tourism-primary);
    transform: translateY(-2px);
}

/* Mobile: center SEGUICI icons + legal/policy links (flex shrink-wrap was left-aligned) */
@media (max-width: 991.98px) {
    /* Prod CSS grid uses ~2rem gap between stacked footer columns */
    .footer-content.row {
        row-gap: 2rem;
    }

    .footer-social {
        justify-content: center;
        width: 100%;
    }

    .footer-social .social-links {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
    }

    .site-footer.it-footer .footer-legal-menu,
    .footer-bottom .footer-legal-menu {
        width: 100%;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* ==========================================================================
   Footer Newsletter
   ========================================================================== */

.footer-newsletter {
    background: var(--tourism-primary);
    padding: var(--tourism-space-6);
    border-radius: var(--tourism-border-radius-xl);
    margin-bottom: var(--tourism-space-6);
}

.footer-newsletter h4 {
    color: var(--tourism-white);
    margin-bottom: var(--tourism-space-4);
}

.footer-newsletter p {
    color: var(--tourism-gray-200);
    margin-bottom: var(--tourism-space-4);
}

.footer-newsletter-form {
    display: flex;
    gap: var(--tourism-space-3);
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    padding: var(--tourism-space-3);
    border: none;
    border-radius: var(--tourism-border-radius);
    font-size: var(--tourism-text-sm);
}

.footer-newsletter-form .tourism-btn {
    min-width: 120px;
}

/* ==========================================================================
   Footer Contact Info
   ========================================================================== */

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--tourism-space-3);
    margin-bottom: var(--tourism-space-3);
    color: var(--tourism-gray-300);
}

.footer-contact li i {
    color: var(--tourism-accent-yellow);
    font-size: var(--tourism-text-base);
    width: 20px;
    text-align: center;
}

.footer-contact a {
    color: var(--tourism-gray-300);
    text-decoration: none;
    transition: color var(--tourism-transition-normal);
}

.footer-contact a:hover {
    color: var(--tourism-accent-yellow);
}

/* ==========================================================================
   Hero Layout Components
   ========================================================================== */

.hero-modern {
    position: relative;
    padding: var(--space-16) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    overflow: hidden;
}

.hero-text-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--text-6xl);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-6);
    line-height: var(--leading-tight);
}

.hero-description {
    font-size: var(--text-xl);
    margin-bottom: var(--space-8);
    opacity: 0.9;
    line-height: var(--leading-relaxed);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.hero-info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    padding: var(--space-6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-grid-scopri {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

/* ==========================================================================
   Section Components
   ========================================================================== */

.section-background {
    position: relative;
    padding: var(--space-16) 0;
    background: var(--gray-50);
}

.section-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 95, 65, 0.05), rgba(212, 175, 55, 0.05));
    z-index: -1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--gray-800);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--border-radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--space-4);
    z-index: 1;
}

.section-title .title-main {
    display: block;
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
}

.section-title .title-main.dark {
    color: var(--gray-800);
}

.section-title .title-sub {
    display: block;
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    color: var(--gray-600);
    margin-top: var(--space-2);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

.section-description.dark {
    color: var(--gray-700);
}

/* ==========================================================================
   Modern Geometric Elements
   ========================================================================== */

/* Geometric Shapes and Backgrounds */
.section {
    position: relative;
    overflow: hidden;
}

.section::before,
.section::after {
    content: '';
    position: absolute;
    z-index: 0;
    opacity: 0.1;
}

/* Primary section decorations */
.section:nth-child(odd)::before {
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--tourism-primary), var(--tourism-accent-yellow));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.section:nth-child(even)::after {
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: var(--tourism-accent-blue);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float 8s ease-in-out infinite reverse;
}

/* Float animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Responsive design for section decorations */
@media (max-width: 768px) {

    .section::before,
    .section::after {
        display: none;
    }

    .site-footer {
        background-image: none;
    }
}

/* ==========================================================================
   Footer Legal Links - White Color and No Underline on Hover
   ========================================================================== */

.footer-bottom .footer-bottom-right .footer-legal-menu li a {
    text-decoration: none !important;
    transition: opacity 0.3s ease;
}

.footer-bottom .footer-bottom-right .footer-legal-menu li a:hover {
    opacity: 0.7 !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Footer Menu Items and Titles - White Color and Better Styling
   ========================================================================== */

/* Footer Menu Titles */
.footer-title {
    font-family: var(--font-primary) !important;
    font-size: 1.25rem !important;
    /* Bigger title size */
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    /* Bottom margin */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer Menu Items */
.footer-menu a {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: block !important;
    padding: 0.25rem 0 !important;
    color: var(--primary-color, #1f3b87) !important;
}

.footer-menu a:hover {
    color: var(--bs-link-hover-color, #16325e) !important;
    text-decoration: none !important;
}

/* Designed-by row — match prod spacing (0.5rem / 1.5rem); no BI border-top */
.footer-designed-by-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0 1.5rem;
}
