/*
Theme Name: Itsasoa Begira
Theme URI: https://www.itsasoabegira.org
Author: Itsasoa Begira
Author URI: https://www.itsasoabegira.org
Description: Tema oficial de la asociación medioambiental Itsasoa Begira. Diseñado para mostrar la misión de limpieza de mares, blog de noticias y tienda ecológica sin plástico.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itsasoa-begira
Tags: environment, blog, e-commerce, ocean, ecology
*/

/* ══════════════════════════════════════
   VARIABLES Y RESET
══════════════════════════════════════ */
:root {
    --ocean-deep:   #0a2342;
    --ocean-mid:    #1a5276;
    --ocean-bright: #1ca7ec;
    --ocean-light:  #a8e6f0;
    --coral:        #f0a500;
    --green-leaf:   #2e8b57;
    --green-light:  #5cb85c;
    --sand:         #fdf6e3;
    --white:        #ffffff;
    --text-dark:    #0d1b2a;
    --text-mid:     #3a5068;
    --radius:       20px;
    --shadow:       0 4px 24px rgba(10,35,66,0.08);
    --shadow-hover: 0 12px 40px rgba(10,35,66,0.15);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a  { text-decoration: none; }

/* ══════════════════════════════════════
   TIPOGRAFÍA
══════════════════════════════════════ */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

/* ══════════════════════════════════════
   NAVEGACIÓN
══════════════════════════════════════ */
#masthead {
    position: fixed; top:0; left:0; right:0;
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5vw;
    height: 72px;
    background: rgba(10,35,66,0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(28,167,236,0.2);
    transition: box-shadow .3s;
}
#masthead.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.3); }

.site-branding {
    display: flex; align-items: center; gap: 12px;
}
.site-branding img {
    height: 48px; width: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ocean-bright);
}
.site-title a {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 0.02em;
}
.site-title a span { color: var(--green-light); }

#primary-navigation ul {
    display: flex; gap: 2rem; list-style: none;
}
#primary-navigation a {
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color .2s;
}
#primary-navigation a:hover { color: var(--ocean-bright); }

.nav-cta a {
    background: var(--green-leaf) !important;
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 50px;
}
.nav-cta a:hover { background: var(--green-light) !important; }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero-section {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: linear-gradient(135deg, var(--ocean-deep) 0%, #0d3b6e 40%, #0a6e9e 70%, #0fa3b1 100%);
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

.hero-bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    animation: rise linear infinite;
}
@keyframes rise {
    0%   { transform: translateY(100vh) scale(0.5); opacity:0; }
    10%  { opacity:1; }
    90%  { opacity:0.4; }
    100% { transform: translateY(-10vh) scale(1); opacity:0; }
}

.hero-inner {
    position: relative; z-index: 2;
    max-width: 1200px; margin: 0 auto;
    padding: 80px 5vw 60px;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
    flex: 1;
}

.hero-tag {
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--ocean-light);
    display: block; margin-bottom: 1rem;
}
.hero-inner h1 {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    color: var(--white);
    margin-bottom: 1.5rem;
}
.hero-inner h1 span { color: var(--ocean-bright); }
.hero-inner p {
    font-size: 1.1rem; color: rgba(255,255,255,0.8);
    line-height: 1.8; margin-bottom: 2rem;
    max-width: 480px;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600; font-size: 0.95rem;
    transition: all .25s; display: inline-block;
    cursor: pointer; border: none;
}
.btn-primary {
    background: var(--ocean-bright); color: var(--white);
    box-shadow: 0 8px 24px rgba(28,167,236,0.4);
}
.btn-primary:hover {
    background: #2dbef5;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(28,167,236,0.5);
}
.btn-secondary {
    background: transparent; color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.btn-green {
    background: var(--green-leaf); color: var(--white);
    box-shadow: 0 8px 24px rgba(46,139,87,0.3);
}
.btn-green:hover { background: var(--green-light); transform: translateY(-2px); }

.hero-visual {
    display: flex; justify-content: center; align-items: center;
}
.hero-logo-ring {
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(28,167,236,0.3);
    display: flex; align-items: center; justify-content: center;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 80px rgba(28,167,236,0.3);
}
.hero-logo-ring img { width: 240px; height: 240px; object-fit: contain; }
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-18px); }
}

.hero-stats {
    position: relative; z-index: 2;
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    padding: 0 5vw 3rem;
    max-width: 1200px; margin: 0 auto; width: 100%;
}
.stat {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 1.2rem 2rem;
    color: var(--white); flex: 1; min-width: 130px;
}
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; color: var(--ocean-bright); font-weight: 900;
}
.stat-label { font-size: 0.82rem; opacity: 0.75; margin-top: 4px; }

/* ══════════════════════════════════════
   SECCIONES GENERALES
══════════════════════════════════════ */
.section-wrap { padding: 100px 5vw; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-tag {
    display: inline-block;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--ocean-bright); margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--ocean-deep); margin-bottom: 1rem;
}
.section-sub {
    font-size: 1rem; color: var(--text-mid);
    line-height: 1.8; max-width: 560px;
    margin-bottom: 3rem;
}
.section-header-flex {
    display: flex; justify-content: space-between;
    align-items: flex-end; margin-bottom: 3rem; flex-wrap: wrap; gap: 1rem;
}

/* ══════════════════════════════════════
   MISIÓN
══════════════════════════════════════ */
.mission-section { background: var(--sand); }
.mission-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem;
}
.mission-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid rgba(10,35,66,0.06);
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
    position: relative; overflow: hidden;
}
.mission-card::before {
    content: ''; position: absolute; top:0; left:0; right:0; height:4px;
}
.mission-card.blue::before   { background: var(--ocean-bright); }
.mission-card.green::before  { background: var(--green-leaf); }
.mission-card.coral::before  { background: var(--coral); }
.mission-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-icon { font-size: 2.8rem; margin-bottom: 1rem; display: block; }
.mission-card h3 { font-size: 1.35rem; color: var(--ocean-deep); margin-bottom: 0.75rem; }
.mission-card p  { color: var(--text-mid); line-height: 1.7; font-size: 0.95rem; }

/* ══════════════════════════════════════
   BLOG
══════════════════════════════════════ */
.blog-section { background: var(--white); }
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }

.card-post {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(10,35,66,0.08);
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
}
.card-post:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.post-thumb {
    height: 200px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.post-thumb img { width:100%; height:100%; object-fit: cover; }
.post-thumb-placeholder {
    width:100%; height:100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.post-body { padding: 1.5rem; }
.post-cat {
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ocean-bright); margin-bottom: 0.5rem; display: block;
}
.post-body h3 {
    font-size: 1.1rem; color: var(--ocean-deep);
    margin-bottom: 0.6rem; line-height: 1.4;
}
.post-body p { font-size: 0.88rem; color: var(--text-mid); line-height: 1.7; }
.post-meta {
    font-size: 0.8rem; color: #aaa;
    display: flex; gap: 1rem; margin-top: 0.75rem;
}
.read-more {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.85rem; font-weight: 600;
    color: var(--ocean-bright); margin-top: 0.75rem;
    transition: gap .2s;
}
.read-more:hover { gap: 10px; }

/* ══════════════════════════════════════
   TIENDA / WOOCOMMERCE
══════════════════════════════════════ */
.shop-section {
    background: linear-gradient(180deg, #f0f9ff 0%, var(--sand) 100%);
}
.products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(10,35,66,0.07);
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.product-img {
    height: 180px; position: relative;
    display: flex; align-items: center; justify-content: center; font-size: 3.5rem;
}
.product-img img { width:100%; height:100%; object-fit: cover; }
.eco-badge {
    position: absolute; top:10px; right:10px;
    background: var(--green-leaf); color: white;
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.08em; padding: 3px 8px;
    border-radius: 50px; text-transform: uppercase;
}
.product-body { padding: 1.2rem; }
.product-body h3 { font-size: 1rem; color: var(--ocean-deep); margin-bottom: 0.4rem; }
.product-body p  { font-size: 0.82rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 0.8rem; }
.product-footer  { display: flex; align-items: center; justify-content: space-between; }
.woocommerce-Price-amount {
    font-size: 1.15rem; font-weight: 700; color: var(--ocean-deep);
}
.add_to_cart_button, .single_add_to_cart_button {
    background: var(--ocean-deep) !important;
    color: white !important;
    border: none !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background .2s, transform .2s !important;
}
.add_to_cart_button:hover, .single_add_to_cart_button:hover {
    background: var(--ocean-mid) !important;
    transform: scale(1.04);
}

/* WooCommerce overrides */
.woocommerce ul.products { margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products li.product {
    width: 100% !important; margin: 0 !important; float: none !important;
}
.woocommerce-store-notice { background: var(--ocean-deep) !important; }

/* ══════════════════════════════════════
   CTA BAND
══════════════════════════════════════ */
.cta-band {
    background: linear-gradient(135deg, var(--ocean-deep) 0%, #0d5c8f 50%, #0a8075 100%);
    padding: 80px 5vw;
    text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
    content: '🌊'; position: absolute; font-size: 20rem;
    opacity: 0.04; top:50%; left:50%; transform: translate(-50%,-50%);
}
.cta-band h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white); margin-bottom: 1rem; position: relative;
}
.cta-band p {
    color: rgba(255,255,255,0.75); font-size: 1.05rem;
    max-width: 520px; margin: 0 auto 2.5rem;
    line-height: 1.8; position: relative;
}
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
#colophon {
    background: var(--ocean-deep);
    color: rgba(255,255,255,0.65);
    padding: 60px 5vw 30px;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem; margin-bottom: 3rem;
}
.footer-brand-logo {
    display: flex; align-items: center; gap: 12px; margin-bottom: 1rem;
}
.footer-brand-logo img {
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2); object-fit: cover;
}
.footer-brand-logo span {
    font-family: 'Playfair Display', serif;
    color: white; font-size: 1.1rem;
}
.footer-brand-logo span em { color: var(--green-light); font-style: normal; }
.footer-brand p { font-size: 0.9rem; line-height: 1.8; max-width: 260px; }

.footer-col h4 {
    color: var(--white); font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem; transition: color .2s;
}
.footer-col ul a:hover { color: var(--ocean-bright); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex; justify-content: space-between;
    align-items: center; font-size: 0.82rem; flex-wrap: wrap; gap: 1rem;
}
.footer-socials { display: flex; gap: 0.75rem; }
.social-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: background .2s;
    color: white; text-decoration: none;
}
.social-btn:hover { background: var(--ocean-bright); color: white; }

/* ══════════════════════════════════════
   PÁGINAS INTERIORES
══════════════════════════════════════ */
.page-hero {
    padding: 140px 5vw 80px;
    background: linear-gradient(135deg, var(--ocean-deep), #0a6e9e);
    text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p  { color: rgba(255,255,255,0.75); margin-top: 1rem; font-size: 1.05rem; }

.page-content { max-width: 860px; margin: 0 auto; padding: 80px 5vw; }
.page-content h2 { color: var(--ocean-deep); margin: 2rem 0 1rem; }
.page-content p  { color: var(--text-mid); line-height: 1.8; margin-bottom: 1rem; }

/* Single post */
.single-post-wrap { max-width: 800px; margin: 0 auto; padding: 120px 5vw 80px; }
.single-post-wrap h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--ocean-deep); margin-bottom: 1.5rem;
}
.post-featured-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.entry-content p { color: var(--text-mid); line-height: 1.9; margin-bottom: 1.2rem; }
.entry-content h2 { color: var(--ocean-deep); margin: 2rem 0 1rem; }

/* Comments */
.comments-area { max-width: 800px; margin: 0 auto; padding: 0 5vw 80px; }
.comment-form input, .comment-form textarea {
    width: 100%; border: 1px solid rgba(10,35,66,0.15);
    border-radius: 10px; padding: 12px 16px;
    font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
    margin-bottom: 1rem;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: 2px solid var(--ocean-bright); border-color: transparent;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-inner   { grid-template-columns: 1fr; text-align: center; }
    .hero-btns    { justify-content: center; }
    .hero-visual  { display: none; }
    .mission-grid { grid-template-columns: 1fr; }
    .blog-grid    { grid-template-columns: 1fr; }
    .products-grid{ grid-template-columns: 1fr 1fr; }
    .footer-grid  { grid-template-columns: 1fr 1fr; }
    #primary-navigation { display: none; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .footer-grid   { grid-template-columns: 1fr; }
    .hero-stats    { flex-direction: column; }
}
